/* Sursa YouTube: playerul punții, banda de sub el, poarta de informare și lista funcțiilor oprite. Fără stiluri inline (CSP). */

/* ---- scena în modul YouTube: playerul sus, o bandă de 36 px dedesubt; nimic nu se desenează peste player (RMF) ---- */
.yt-host { position: absolute; inset: 0; background: #000; }
.yt-host[hidden] { display: none; }
.stage.is-yt { height: clamp(236px, 44vh, 540px); } /* playerul are cel puțin 200 x 200 px, plus banda */
.stage.is-yt:fullscreen { height: 100%; }
.stage.is-yt video { display: none; }
.stage.is-yt .yt-host { bottom: 36px; }
.yt-frame { display: block; width: 100%; height: 100%; min-height: 200px; border: 0; background: #000; }

.stage-bar {
  position: absolute; left: 0; right: 0; bottom: 0; height: 36px; z-index: 2;
  display: flex; align-items: center; gap: 10px; padding: 0 10px; overflow: hidden;
  background: #0b1218; border-top: 1px solid var(--line); color: var(--text);
}
.stage-bar[hidden] { display: none; }
.stage-bar:focus { outline: none; }
.stage-bar:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.stage-bar-tc { flex: none; }
.stage-bar-notes { flex: 1 1 0; min-width: 0; display: flex; gap: 8px; align-items: center; overflow: hidden; }
.yt-precision { flex: none; color: var(--muted); font-size: 0.78rem; white-space: nowrap; }

/* ce era peste video devine rând în bandă */
.stage.is-yt .stage-bar .stage-tc {
  position: static; display: inline-block; padding: 0; background: none; font-size: 1rem;
}
.stage.is-yt .stage-bar .stage-flash {
  position: static; display: none; opacity: 1; max-width: none; flex: 1 1 0; min-width: 0;
  padding: 2px 8px; font-size: 0.9rem; background: rgba(255, 255, 255, 0.06);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.stage.is-yt .stage-bar .stage-flash.show { display: block; }
.stage.is-yt .stage-bar .stage-reminder,
.stage.is-yt .stage-bar .stage-tip {
  position: static; flex: 1 1 0; min-width: 0; padding: 1px 8px; font-size: 0.78rem; line-height: 1.15;
  max-height: 32px; overflow: hidden; gap: 6px; flex-wrap: nowrap;
}
.stage.is-yt .stage-bar .stage-reminder[hidden],
.stage.is-yt .stage-bar .stage-tip[hidden] { display: none; }
.stage.is-yt .stage-bar .stage-reminder .btn { min-height: 22px; padding: 0 6px; font-size: 0.75rem; flex: none; }
.stage.is-yt .stage-bar .stage-tip { font-weight: 500; }
.yt-msg { flex: 1 1 0; min-width: 0; font-size: 0.82rem; color: var(--warn); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.yt-msg[hidden] { display: none; }

/* ---- locul playerului când nu e încă (sau nu mai e) player: poarta de informare, offline, erori ---- */
.yt-panel {
  position: absolute; inset: 0; display: flex; flex-direction: column; gap: 6px; padding: 14px 18px 0;
  overflow: auto; background: #0b1218; color: var(--text); font-size: 0.88rem;
}
.yt-panel h2 { font-size: 1.1rem; }
.yt-panel p { margin: 0; }
.yt-panel a { color: var(--primary-hi); }
.yt-panel .check { margin-top: 2px; }
.yt-panel-actions { position: sticky; bottom: 0; display: flex; gap: 8px; align-items: center; padding: 8px 0 12px; margin-top: auto; background: #0b1218; }
.yt-panel-status { color: var(--warn); }
.yt-panel-status[data-kind="loading"] { color: var(--muted); }

/* ---- ce nu merge cu un link: butoane dezactivate, cu motivul scris ---- */
.yt-limits {
  list-style: none; margin: 0; padding: 6px 8px; display: flex; flex-direction: column; gap: 3px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); font-size: 0.78rem; color: var(--muted);
}
.yt-limits[hidden] { display: none; }
.yt-limits li { display: flex; gap: 8px; align-items: center; }
.yt-limits .btn { flex: 0 0 13em; justify-content: flex-start; }
.yt-limits .yt-limit-note { padding-left: 2px; }

/* ---- fereastra de realiniere (link -> fișier): nemodală, ca playerul să rămână folosibil ---- */
dialog.dlg-float {
  position: fixed; margin: 0; inset: auto 12px 12px auto; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 80px); z-index: 20;
}
dialog.dlg-float[open] { display: flex; flex-direction: column; }
dialog.dlg-float .dlg-body { overflow: auto; }
.relink-row { border-top: 1px solid var(--line); padding-top: 6px; }
.inst-out { color: var(--warn); }
