/* Pyre.Stream: Test stream (plan docs/superpowers/plans/2026-10-23-test-stream.md, T4;
   mockup docs/design/2026-10-23-test-stream-mockup.html). Own file on purpose:
   pane audits read sections.css to EOF, so nothing new is appended there.
   Loaded after sections.css. App-tab-only rules live in app-tab.css.

   --ts-blue is the mockup's TEST identity colour. It is scoped here (not a global
   token) because nothing else uses it yet; promote it to shared/design-tokens.json
   if a second surface needs it. */

.ts-slot, .ls-slot, .ts-dest, .ts-mode, .ts-mode-on { --ts-blue: #5b8dff; --ts-blue-strong: #2f6fed; --ts-blue-wash: rgba(91,141,255,.16); --ts-blue-line: rgba(91,141,255,.7); --ts-blue-text: #bcd0ff; }

/* ── The control (button / armed / active bar) next to Go Live ── */
.ts-slot { display: flex; flex-direction: column; gap: var(--space-3); padding-top: var(--space-3); }
.ts-slot[hidden] { display: none; }
.ts-bar { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2); min-height: 36px; }
.ts-bar [hidden] { display: none; }
.ts-start {
  border-radius: var(--r-pill); background: var(--ts-blue-wash); border: 1px solid var(--ts-blue-line);
  color: var(--ts-blue-text); font-weight: 700;
}
.ts-start:hover:not(:disabled) { background: rgba(91,141,255,.24); }
.ts-start:focus-visible { outline: 2px solid var(--ts-blue); outline-offset: 2px; }
.ts-badge { background: var(--ts-blue-strong); color: #fff; font-weight: 700; letter-spacing: .06em; }
.ts-left { font-family: var(--font-mono); font-variant-numeric: tabular-nums; border: 1px solid var(--ts-blue-line); }
.ts-left.is-warn { border-color: var(--warn); color: var(--warn); }
.ts-text { color: var(--text-dim); font-size: 13px; }
.ts-text--armed { color: var(--ts-blue-text); }
.ts-end { border-color: var(--danger); color: var(--danger); }
.ts-note { margin: 0; color: var(--text-dim); font-size: 13px; }
.ts-note:empty { display: none; }

/* ── The test player card ── */
.ts-player { display: flex; flex-direction: column; gap: var(--space-3); }
.ts-player-head { justify-content: flex-start; }
.ts-player-head .ts-left { margin-left: auto; }
.ts-player-head [hidden] { display: none; }
.ts-body { display: grid; grid-template-columns: minmax(0, 1fr) 13rem; gap: var(--space-4); align-items: start; }
.ts-stage { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-sm); overflow: hidden; background: var(--surface-inset); }
.ts-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.ts-stage-msg {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); margin: 0;
  max-width: 80%; text-align: center; color: var(--text-dim); font-size: 13px;
}
.ts-stage-msg[hidden] { display: none; }
.ts-unmute { position: absolute; right: var(--space-2); bottom: var(--space-2); }
.ts-unmute[hidden] { display: none; }
.ts-side { display: flex; flex-direction: column; gap: var(--space-3); font-size: 13px; }
.ts-side [hidden] { display: none; }
.ts-box {
  display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-3);
  background: var(--surface-inset); border: 1px solid var(--border); border-radius: var(--r-sm);
}
.ts-box h3 { margin: 0; font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--text-faint); }
.ts-kv { display: flex; justify-content: space-between; gap: var(--space-2); }
.ts-kv span { color: var(--text-dim); }
.ts-kv b { font-family: var(--font-mono); font-weight: 500; font-variant-numeric: tabular-nums; }
/* The track carries the full green/amber/red scale; <i> covers the unlit part
   from the right (JS sets its width to 100% minus the level). */
.ts-meter {
  position: relative; height: 8px; border-radius: 4px; overflow: hidden;
  background: linear-gradient(90deg, var(--ok) 0 70%, var(--warn) 70% 90%, var(--danger) 90%);
}
.ts-meter i { position: absolute; top: 0; right: 0; bottom: 0; width: 100%; background: var(--bg); transition: width 80ms linear; }
.ts-link {
  font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); padding: 6px var(--space-2);
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-chip);
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis; user-select: all;
}
.ts-fine { margin: 0; font-size: 11px; color: var(--text-faint); }

/* ── The test report (after a test) + the idle "Last test" line ── */
.ts-last { display: inline-flex; align-items: center; gap: var(--space-1); color: var(--text-dim); font-size: 13px; }
.ts-last[hidden] { display: none; }
.ts-show {
  background: none; border: 0; padding: 0; color: var(--ts-blue-text); font: inherit;
  text-decoration: underline; text-underline-offset: 2px; cursor: pointer;
}
.ts-show:focus-visible { outline: 2px solid var(--ts-blue); outline-offset: 2px; }
.ts-report { display: flex; flex-direction: column; gap: var(--space-3); }
.ts-report-head { justify-content: space-between; }
.ts-verdict { margin: 0; padding: var(--space-2) var(--space-3); border-radius: var(--r-sm); font-weight: 600; border: 1px solid var(--border); }
.ts-verdict.is-ok { color: var(--ok); border-color: var(--ok); }
.ts-verdict.is-warn { color: var(--warn); border-color: var(--warn); }
.ts-verdict.is-bad { color: var(--danger); border-color: var(--danger); }
.ts-verdict.is-info, .ts-verdict.is-wait { color: var(--text-dim); font-weight: 500; }
.ts-report-rows {
  display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--space-2) var(--space-4);
  margin: 0; font-size: 13px;
}
.ts-report-rows[hidden] { display: none; }
.ts-report-rows dt { color: var(--text-dim); }
.ts-report-rows dd { margin: 0; font-family: var(--font-mono); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ts-report-rows dd.is-na { font-family: inherit; color: var(--text-faint); }
.ts-report-sub { margin: 0; font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--text-faint); }
.ts-report-sub[hidden], .ts-checks[hidden] { display: none; }
.ts-checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); font-size: 13px; }
.ts-check {
  display: flex; flex-direction: column; gap: 2px; padding: var(--space-2) var(--space-3);
  border-left: 3px solid var(--border); background: var(--surface-inset); border-radius: var(--r-sm);
}
.ts-check.is-ok { border-left-color: var(--ok); }
.ts-check.is-warn { border-left-color: var(--warn); }
.ts-check.is-bad { border-left-color: var(--danger); }
.ts-check b { font-weight: 600; }
.ts-check span { color: var(--text-dim); }


/* ── The "Last stream" line + its report panel (last-stream.js; live report,
   plan 2026-11-01-admin-push-and-live-report.md). The panel reuses the test
   report classes above; only the slot, the line and the destinations list are new. ── */
.ls-slot { display: flex; flex-direction: column; gap: var(--space-3); padding-top: var(--space-2); }
.ls-slot[hidden], .ls-slot.ls-empty { display: none; }
.ls-slot [hidden] { display: none; }
.ls-line { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-1); color: var(--text-dim); font-size: 13px; }
.ls-text { overflow-wrap: anywhere; }
.ls-dests { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-1); font-size: 13px; }
.ls-dest {
  display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2); padding: var(--space-2) var(--space-3);
  background: var(--surface-inset); border-radius: var(--r-sm);
}
.ls-dest-name { font-weight: 600; }
.ls-dest-status { color: var(--text-dim); }
.ls-dest-status.is-ok { color: var(--ok); }
.ls-dest-status.is-warn { color: var(--warn); }
.ls-dest-status.is-bad { color: var(--danger); }
.ls-dest-stalls { margin-left: auto; color: var(--text-faint); font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

@media (max-width: 980px) {
  .ts-body { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .ts-report-rows { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .ts-report-rows dd { margin-bottom: var(--space-2); }
}
@media (prefers-reduced-motion: reduce) {
  .ts-meter i { transition: none; }
}

/* ── Destinations: the "Pyre test" row + the Test mode switch ── */
.ts-dest-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ts-blue); flex: none; }
.ts-dest .t { display: inline-flex; align-items: center; gap: var(--space-2); }
.ts-private { font-size: 11px; color: var(--text-faint); font-weight: 500; }
.ts-soon { font-size: 11px; color: var(--text-faint); white-space: nowrap; }
.ts-mode-on { color: var(--ts-blue-text); }
