/* nl_edit.css - "Tell it what to change" (static/js/nl_edit.js). Own file: app.css is at its size
 * cap. Every rule is under .nle-*, so deleting the script tag leaves the page as it was (C3).
 * Theme tokens only; spacing 4/8/12/16/24, type 12/13/15, 2px gold focus ring (DESIGN.md). */

/* ── The bar above the results ─────────────────────────────────────────────────────────────── */
.nle-bar {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 8px 0 12px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--s1);
}
.nle-bar[hidden] { display: none; }
.nle-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--dim);
}
.nle-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.nle-input {
  flex: 1 1 260px;
  min-width: 0;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--border2);
  border-radius: 6px;
  background: var(--s2);
  color: var(--text);
  font: inherit;
  font-size: 13px;
}
.nle-input::placeholder { color: var(--muted); }
.nle-input:focus-visible,
.nle-bar .btn:focus-visible,
.nle-dialog :is(button, input):focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.nle-go[disabled] { opacity: .5; cursor: progress; }
.nle-undo[hidden] { display: none; }
.nle-status { min-height: 0; font-size: 12px; color: var(--muted); }
.nle-status:empty { display: none; }

/* ── The preview dialog ────────────────────────────────────────────────────────────────────── */
.nle-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, .55);
}
.nle-dialog {
  display: flex;
  flex-direction: column;
  width: min(720px, 100%);
  max-height: min(84vh, 900px);
  border: 1px solid var(--border2);
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  box-shadow: 0 16px 48px rgba(0, 0, 0, .35);
}
.nle-h { margin: 0; padding: 16px 24px 4px; font-size: 15px; font-weight: 600; }
.nle-sub { margin: 0; padding: 0 24px 12px; font-size: 13px; color: var(--dim); }
.nle-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 0 24px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.nle-item { padding: 12px 0; border-bottom: 1px solid var(--border); }
.nle-item:last-child { border-bottom: 0; }
.nle-item-h { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; font-weight: 600; }
.nle-item-h input { width: 16px; height: 16px; margin: 0; accent-color: var(--gold); }
.nle-file { overflow-wrap: anywhere; }
.nle-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.nle-chip {
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid var(--border2);
  font-size: 12px;
  line-height: 1.5;
}
.nle-chip.nle-add { border-color: var(--ok, #34d399); color: var(--ok, #34d399); }
.nle-chip.nle-rm { color: var(--muted); text-decoration: line-through; }
.nle-ba { margin-top: 8px; font-size: 13px; line-height: 1.45; }
.nle-ba-l { font-size: 12px; font-weight: 600; color: var(--dim); }
.nle-before { color: var(--muted); text-decoration: line-through; overflow-wrap: anywhere; }
.nle-after { color: var(--text); overflow-wrap: anywhere; }
.nle-warn { margin: 8px 0 0; font-size: 12px; color: var(--warn); }
.nle-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 24px 16px; }

@media (max-width: 640px) {
  .nle-h, .nle-sub, .nle-list, .nle-foot { padding-left: 16px; padding-right: 16px; }
  .nle-input { font-size: 16px; }            /* iOS zooms into smaller inputs */
}
