/* ELI STREAMING · Visor */
.app { display: flex; flex-direction: column; height: 100vh; height: 100dvh; overflow: hidden; background: var(--bg); color: var(--ink); }

.sweep-text {
  display: none; flex-shrink: 0; align-items: center; gap: .375rem;
  font-size: .75rem; line-height: 1rem; color: var(--hint); white-space: nowrap;
}
.sweep-text b { color: var(--ink); font-weight: 600; }
@media (min-width: 768px) { .sweep-text:not([hidden]) { display: inline-flex; } }
.sweep-text .dot { color: var(--accent); }

/* ---------- Paneles ---------- */
.panel-cmd {
  flex-shrink: 0; max-height: 7rem; overflow: auto; padding: .5rem .75rem;
  border-bottom: 1px solid var(--line); background: var(--field); color: var(--accent);
  font-size: .75rem; line-height: 1.25rem; white-space: pre;
}
.panel {
  flex-shrink: 0; max-height: 12rem; overflow: auto; padding: .5rem .75rem;
  border-bottom: 1px solid var(--line); background: var(--panel); font-size: .75rem; line-height: 1rem;
}
.panel--ids { max-height: 14rem; }
.panel-note { margin-bottom: .5rem; color: var(--muted); }
.api-list > li { display: flex; align-items: center; gap: .5rem; }
.api-list > li + li { margin-top: .25rem; }
.api-list .k { width: 9rem; flex-shrink: 0; color: var(--muted); }
.api-list code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.api-list button { flex-shrink: 0; color: var(--accent); }
.api-list button:hover { text-decoration: underline; text-underline-offset: 2px; }

.panel--ids > p { color: var(--ink); }
.ids-list { margin-top: .5rem; color: var(--muted); }
.ids-list li + li { margin-top: .25rem; }
.ids-list b { color: var(--ink); font-weight: 700; }
.ids-table { width: 100%; margin-top: .75rem; text-align: left; }
.ids-table th { padding-right: .75rem; color: var(--muted); font-weight: 500; }
.ids-table td { padding: .25rem .75rem .25rem 0; vertical-align: top; }
.ids-table td:first-child { color: var(--accent); }
.ids-table td:last-child { padding-right: 0; color: var(--muted); }

/* ---------- Filtros ---------- */
.filters {
  flex-shrink: 0; display: flex; gap: .5rem; overflow-x: auto; padding: .5rem .625rem;
  border-bottom: 1px solid var(--line); background: var(--panel);
}
@media (min-width: 768px) { .filters { overflow: visible; } }

/* ---------- Escenario: reproductor + lista ---------- */
.stage {
  flex: 1; min-height: 0; display: grid;
  grid-template-rows: minmax(12rem, 42vh) minmax(0, 1fr);
}
@media (min-width: 768px) {
  .stage { grid-template-columns: 18rem minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
  .player { grid-column: 2; grid-row: 1; }
  .list { grid-column: 1; grid-row: 1; border-top: 0 !important; border-right: 1px solid var(--line); }
}

.player { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.screen { position: relative; flex: 1; min-height: 0; background: #000; }
.screen iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.empty {
  display: flex; height: 100%; flex-direction: column; align-items: center; justify-content: center;
  padding: 0 1.5rem; text-align: center;
}
.empty h2 { font-family: var(--display); font-size: 1.875rem; line-height: 2.25rem; font-weight: 600; letter-spacing: .025em; }
.empty p { max-width: 24rem; margin-top: .5rem; font-size: .875rem; line-height: 1.25rem; color: var(--hint); }

.player-foot {
  flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  padding: .5rem .75rem; background: var(--top); font-size: .75rem; line-height: 1rem; color: var(--muted);
}
.pf-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.pf-id { flex-shrink: 0; }

.list { display: flex; flex-direction: column; min-height: 0; border-top: 1px solid var(--line); }
.list-count { padding: .5rem .75rem 0; font-size: .75rem; line-height: 1rem; color: var(--muted); }
.list-count b { font-weight: 600; color: var(--ink); }
.list-scroll { flex: 1; min-height: 0; overflow: auto; padding: 0 .5rem .5rem; scrollbar-color: var(--card-line) transparent; scrollbar-width: thin; }
.list-empty { padding: 1.5rem .5rem; font-size: .875rem; color: var(--hint); }

/* Tarjeta de partido */
.card {
  display: block; width: 100%; margin: .25rem 0; padding: .625rem;
  border: 1px solid var(--card-line); border-radius: var(--r-lg); background: var(--card);
  text-align: left; color: var(--ink); transition: border-color .15s;
}
.card:hover { border-color: var(--accent-60); }
.card[aria-current="true"] { border-color: var(--accent); }
.card-top { display: flex; align-items: flex-start; gap: .5rem; }
.card-name { flex: 1; min-width: 0; font-size: .875rem; line-height: 1.375; font-weight: 600; overflow-wrap: anywhere; }
.card-meta {
  display: block; margin-top: .25rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: .75rem; line-height: 1rem; font-weight: 400; color: var(--hint);
}
.health {
  display: inline-flex; margin-top: .125rem; align-items: center; gap: .3125rem; flex-shrink: 0;
  font-size: .6875rem; line-height: 1rem; font-weight: 600; letter-spacing: .02em; white-space: normal; max-width: 45%;
  /* Ancho fijo: al cambiar el estado ("sin comprobar" / "HLS 480p") el nombre
     del partido no se reacomoda y la tarjeta no cambia de alto. */
  width: 7.5rem; justify-content: flex-end; text-align: right;
}
.event-clock { min-height: 1rem; font-variant-numeric: tabular-nums; }
.health .dot { width: .375rem; height: .375rem; flex-shrink: 0; }
.health.st-activa { color: var(--accent); }
.health.st-activa .t { color: #c8f7dc; }
.health.st-verificando { color: var(--hint); font-weight: 400; font-style: italic; }
.health.st-sinverif { color: #c9a8ff; }
.health.st-sinverif .t { color: #e6dbff; }

/* Identificador técnico reservado para diagnóstico, fuera del pie del visor. */
#pf-id { display: none; }
