/* =====================================================================
   nightshift-zoom.css — the Night ↔ Archive zoom (NS-WEB-PRD-003 §2)
   and the Continue card (§3). The shelf, the bridge, the explicit
   controls, the live region, reduced motion. Prefix: .nsz-
   ===================================================================== */

/* ── the explicit controls (WEB-003-Z10) ───────────────────────────── */
.nsz-controls { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nsz-controls .nsx-btn, .nsz-controls .nsf-cam-btn { white-space: nowrap; }
.nsz-controls[data-surface="night"] { background: rgba(0, 0, 0, 0.55); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 6px; padding: 2px; }
.nsz-kbd { font-family: var(--nsf-mono, ui-monospace, monospace); font-size: 9px; opacity: 0.6; margin-left: 4px; }

/* ── the live region ───────────────────────────────────────────────── */
.nsz-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ── the focus shelf (WEB-003-Z05 / Z06) ───────────────────────────── */
.nsz-shelf {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(520px, calc(100% - 40px)); z-index: 39; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  animation: nszShelfIn 0.22s ease-out;
}
.nsz-shelf.docked { left: 20px; transform: translate(0, -50%); }
.nsz-shelf > * { pointer-events: auto; }
.nsz-shelf-ring { width: min(360px, 80vw); height: min(360px, 80vw); display: block; overflow: visible; }
.nsz-shelf-ring .core { fill: rgba(255, 255, 255, 0.85); stroke: rgba(0, 240, 255, 0.55); stroke-width: 1.5; }
.nsz-shelf-ring .core.supported { stroke: var(--nsf-supported, #5FBFA8); }
.nsz-shelf-ring .core.split { stroke: var(--nsf-split, #f2c14e); }
.nsz-shelf-ring .core.contradicted { stroke: var(--nsf-contradicted, #ff7d7d); }
.nsz-shelf-ring .sat { fill: rgba(0, 240, 255, 0.85); }
.nsz-shelf-ring .sat.member { fill: rgba(255, 210, 120, 0.9); }
.nsz-shelf-ring .orbit { fill: none; stroke: rgba(255, 255, 255, 0.10); stroke-dasharray: 2 3; }
.nsz-shelf-ring .core-label { font-family: var(--nsf-mono, ui-monospace, monospace); font-size: 7px; fill: rgba(255, 255, 255, 0.7); text-anchor: middle; }
.nsz-shelf-card {
  background: var(--nsx-glass-2, rgba(6, 4, 28, 0.82)); border: 1px solid rgba(0, 240, 255, 0.4); border-radius: 12px;
  padding: 10px 14px; color: #fff; font-family: var(--nsf-sans, system-ui, sans-serif); font-size: 12px; line-height: 1.4;
  display: flex; flex-direction: column; gap: 6px; max-width: 100%; backdrop-filter: blur(14px);
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.12), 0 12px 30px rgba(0, 0, 0, 0.45);
}
.nsz-shelf-eyebrow { font-family: var(--nsf-mono, ui-monospace, monospace); font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--nsx-accent, #00f0ff); }
.nsz-shelf-title { font-weight: 700; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nsz-shelf-note { font-family: var(--nsf-mono, ui-monospace, monospace); font-size: 10px; color: rgba(255, 255, 255, 0.6); }
.nsz-shelf-verbs { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.nsz-shelf-hint { font-size: 10.5px; color: rgba(255, 255, 255, 0.55); }
.nsz-shelf-err { font-size: 11px; color: var(--rt-coral, #ff9a9a); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
@keyframes nszShelfIn { from { opacity: 0; transform: translate(-50%, -50%) scale(0.96); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
.nsz-shelf.docked { animation-name: nszShelfInDocked; }
@keyframes nszShelfInDocked { from { opacity: 0; } to { opacity: 1; } }

/* ── the transitions: the bridge overlay (WEB-003-Z01 timings) ─────── */
.nsz-bridge {
  position: absolute; inset: 0; z-index: 60; pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(0, 240, 255, 0.12), rgba(3, 0, 20, 0.92) 70%);
  opacity: 0; transition: opacity 0.42s ease;
}
.nsz-bridge.on { opacity: 1; pointer-events: auto; }
.nsz-bridge-label {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  font-family: var(--nsf-mono, ui-monospace, monospace); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255, 255, 255, 0.85);
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
}
.nsz-bridge-label .nsz-cancel-hint { font-size: 9.5px; letter-spacing: 0.1em; color: rgba(255, 255, 255, 0.5); text-transform: none; }
.nsz-bridge-bar { width: 160px; height: 2px; background: rgba(255, 255, 255, 0.12); border-radius: 2px; overflow: hidden; }
.nsz-bridge-bar > i { display: block; height: 100%; background: var(--nsx-accent, #00f0ff); width: 0; }
/* the Night dims as it contracts; the Archive stage dims as a job opens */
.nsz-collapsing .nsf-canvas, .nsz-collapsing .nsf-hud-top, .nsz-collapsing .nsf-footer { transition: opacity 0.72s ease; }
.nsz-collapsing .nsf-canvas { opacity: calc(1 - var(--nsz-k, 0) * 0.85); }
.nsz-expanding .nsx-canvas { transition: opacity 0.72s ease; opacity: calc(1 - var(--nsz-k, 0) * 0.8); }
.nsz-expanding .nsz-shelf-ring { transition: transform 0.72s ease; transform: scale(calc(1 + var(--nsz-k, 0) * 1.6)); opacity: calc(1 - var(--nsz-k, 0)); }

/* ── reduced motion: the short fade replaces every morph (Z11) ──────── */
@media (prefers-reduced-motion: reduce) {
  .nsz-shelf { animation: none; }
  .nsz-bridge { transition-duration: 0.22s; }
  .nsz-collapsing .nsf-canvas, .nsz-expanding .nsx-canvas, .nsz-expanding .nsz-shelf-ring { transition-duration: 0.22s; transform: none; }
}
.nsz-reduced .nsz-shelf { animation: none; }
.nsz-reduced .nsz-bridge { transition-duration: 0.22s; }
.nsz-reduced.nsz-expanding .nsz-shelf-ring { transition-duration: 0.22s; transform: none; }
.nsz-reduced.nsz-collapsing .nsf-canvas { transition-duration: 0.22s; }

/* ── the Night's own controls (Back to Archive + Continue) ─────────── */
.nsz-night-dock {
  position: absolute; right: 12px; bottom: 96px; z-index: 5; width: min(340px, calc(100% - 24px));
  display: flex; flex-direction: column; gap: 6px; align-items: flex-end;
}
.nsz-night-dock > * { pointer-events: auto; }
.nsz-night-panel {
  width: 100%; background: rgba(0, 0, 0, 0.72); border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 8px; padding: 8px 10px;
  color: #fff; font-size: 12px; backdrop-filter: blur(10px);
  --rt-bg-sunk: rgba(0, 0, 0, 0.45); --rt-bg-alt: rgba(255, 255, 255, 0.04); --rt-border: rgba(255, 255, 255, 0.12);
  --rt-fg: #ffffff; --rt-fg-2: rgba(255, 255, 255, 0.78); --rt-fg-3: rgba(255, 255, 255, 0.5);
}
.nsz-night-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-family: var(--nsf-mono, ui-monospace, monospace); font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(255, 255, 255, 0.55); cursor: pointer; }

/* ── the Continue card (WEB-003-C02 / C03) ─────────────────────────── */
.nsc-card { border: 1px solid var(--rt-border-strong, rgba(255, 255, 255, 0.16)); border-radius: 6px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; background: rgba(0, 240, 255, 0.04); font-size: 12px; color: var(--rt-fg, #fff); }
.nsc-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.nsc-eyebrow { font-family: var(--nsf-mono, ui-monospace, monospace); font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--nsx-accent, #00f0ff); }
.nsc-line { font-size: 11.5px; color: var(--rt-fg-2, #b9c2d3); line-height: 1.45; }
.nsc-plan { font-family: var(--nsf-mono, ui-monospace, monospace); font-size: 10.5px; color: var(--rt-fg-2, #b9c2d3); }
.nsc-facts { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; font-size: 11px; margin: 0; }
.nsc-facts dt { color: var(--rt-fg-3, #8891a0); font-family: var(--nsf-mono, ui-monospace, monospace); font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; }
.nsc-facts dd { margin: 0; color: var(--rt-fg-2, #b9c2d3); }
.nsc-warn { font-size: 11px; color: var(--rt-amber, #f2c14e); }
.nsc-err { font-size: 11px; color: var(--rt-coral, #ff9a9a); }
.nsc-ok { font-size: 11px; color: var(--rt-green, #5FBFA8); }
.nsc-verbs { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.nsc-btn { font: inherit; font-size: 11.5px; padding: 5px 10px; border-radius: 5px; border: 1px solid var(--rt-border-strong, rgba(255, 255, 255, 0.2)); background: rgba(255, 255, 255, 0.06); color: var(--rt-fg, #fff); cursor: pointer; }
.nsc-btn:hover { background: rgba(255, 255, 255, 0.12); }
.nsc-btn.primary { background: rgba(0, 240, 255, 0.18); border-color: rgba(0, 240, 255, 0.5); }
.nsc-btn:disabled { opacity: 0.5; cursor: default; }
.nsc-child { border-top: 1px solid var(--rt-border, rgba(255, 255, 255, 0.1)); padding-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.nsc-chip { display: inline-block; font-family: var(--nsf-mono, ui-monospace, monospace); font-size: 9.5px; letter-spacing: 0.06em; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; border: 1px solid var(--rt-border-strong, rgba(255, 255, 255, 0.18)); color: var(--rt-fg-2, #b9c2d3); }
.nsc-chip.pending { border-color: rgba(242, 193, 78, 0.6); color: var(--rt-amber, #f2c14e); }
.nsc-chip.ok { border-color: rgba(95, 191, 168, 0.6); color: var(--rt-green, #5FBFA8); }
.nsc-chip.warn { border-color: rgba(255, 154, 154, 0.6); color: var(--rt-coral, #ff9a9a); }
.nsc-lineage { display: flex; flex-direction: column; gap: 4px; font-size: 11px; }
.nsc-lineage-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.nsc-lineage-row a, .nsc-lineage-row [role="button"] { color: var(--nsx-accent, #00f0ff); cursor: pointer; text-decoration: underline dotted; }
.nsc-lineage-row .missing { color: var(--rt-fg-3, #8891a0); font-style: italic; }
.nsc-lineage-row .self { font-weight: 700; }
