/* T77 ForceNet TV: oscuro tipo cine, igual en la página pública y en la pestaña TV del portal. Pensado primero para el celular. */
.tv, .tv-pagina, .tv-dialogo, .tv-recargas {
  --tv-fondo: #0b1020; --tv-superficie: #151c2f; --tv-borde: #26304a; --tv-texto: #eef2fb; --tv-suave: #9aa6c2;
  --tv-acento: #38bdf8; --tv-acento-texto: #04121c; --tv-radio: 12px;
}

/* ---------- página pública ---------- */
main.centrado:has(.tv-pagina) { display: block; padding: 0; min-height: 100vh; background: #0b1020; }
.tv-pagina { color: var(--tv-texto); background: var(--tv-fondo); min-height: 100vh; padding-bottom: 2rem; }
.tv-pagina > * { max-width: 1100px; margin-inline: auto; padding-inline: 1rem; }
.tv-barra { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .9rem; }
.tv-logo { display: flex; align-items: center; gap: .5rem; font-size: 1.15rem; }
.tv-logo img { height: 32px; width: auto; border-radius: 6px; }
.tv-logo-tv { background: var(--tv-acento); color: var(--tv-acento-texto); font-weight: 800; font-size: .8rem; padding: .1rem .4rem; border-radius: 5px; letter-spacing: .05em; }
.tv-portada { padding-block: 1.5rem 1rem; }
.tv-portada h1 { font-size: clamp(1.6rem, 6vw, 2.6rem); line-height: 1.15; margin: 0 0 .6rem; }
.tv-resalta { color: var(--tv-acento); }
.tv-portada p { color: var(--tv-suave); margin: .3rem 0; max-width: 40rem; }
.tv-sello { color: #4ade80 !important; font-weight: 600; font-size: .9rem; }
.tv-cta { margin-top: 1.5rem; text-align: center; padding-block: 1.75rem; border-top: 1px solid var(--tv-borde); }
.tv-cta h2 { margin: 0 0 .3rem; font-size: 1.35rem; }
.tv-cta p { color: var(--tv-suave); margin: 0 0 1rem; }

/* ---------- botones ---------- */
.tv-boton, .tv-boton-sec { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; border-radius: 999px; font-weight: 700;
  padding: .65rem 1.3rem; min-height: 44px; text-decoration: none; cursor: pointer; border: 0; font: inherit; font-weight: 700; }
.tv-boton { background: var(--tv-acento); color: var(--tv-acento-texto); }
.tv-boton-sec { background: transparent; color: var(--tv-texto); border: 1px solid var(--tv-borde); }
.tv-boton:hover { filter: brightness(1.1); } .tv-boton-sec:hover { border-color: var(--tv-suave); }
.tv-whatsapp { background: #22c55e; color: #052e14; }
.tv-cerrar { background: rgb(0 0 0 / .55); color: #fff; border: 0; width: 40px; height: 40px; border-radius: 50%; font-size: 1.1rem; cursor: pointer; flex: none; }

/* ---------- sección TV (también en el portal) ---------- */
.tv { color: var(--tv-texto); background: var(--tv-fondo); border-radius: var(--tv-radio); padding: 1rem 0; }
.tv-pagina > .tv { padding-inline: 1rem; }
.cliente-panel .tv { padding: 1rem; }
/* en el portal (columna flex) los carruseles no deben ensanchar la página: se deslizan dentro */
.cliente-panel [data-panel="tv"], .tv, .tv-fila, .tv-carrusel { min-width: 0; max-width: 100%; }
.tv-buscar { display: flex; align-items: center; gap: .5rem; background: var(--tv-superficie); border: 1px solid var(--tv-borde); border-radius: 999px; padding: .2rem 1rem; margin-bottom: 1rem; }
.tv-buscar input { flex: 1; background: transparent; border: 0; color: var(--tv-texto); font: inherit; padding: .55rem 0; min-width: 0; outline: none; }
.tv-buscar:focus-within { border-color: var(--tv-acento); }
.tv-fila { margin-bottom: 1.25rem; }
.tv-fila h2 { font-size: 1.1rem; margin: 0 0 .6rem; }
.tv-carrusel { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 42%); gap: .7rem; overflow-x: auto;
  scroll-snap-type: x mandatory; padding-bottom: .4rem; scrollbar-width: thin; }
@media (min-width: 700px) { .tv-carrusel { grid-auto-columns: 220px; } }
.cliente-panel .tv-carrusel { grid-auto-columns: minmax(150px, 44%); }
.tv-tarjeta { scroll-snap-align: start; display: flex; flex-direction: column; text-align: left; background: var(--tv-superficie); color: var(--tv-texto);
  border: 1px solid var(--tv-borde); border-radius: var(--tv-radio); overflow: hidden; padding: 0; cursor: pointer; font: inherit; transition: transform .15s, border-color .15s; }
.tv-tarjeta:hover, .tv-tarjeta:focus-visible { transform: translateY(-2px); border-color: var(--tv-acento); }
.tv-tarjeta img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: #000; }
.tv-tarjeta-pie { display: flex; flex-direction: column; gap: .15rem; padding: .55rem .65rem .65rem; }
.tv-tarjeta-pie b { font-size: .92rem; line-height: 1.2; }
.tv-tarjeta-pie small { color: var(--tv-suave); font-size: .78rem; }
.tv-cargando, .tv-sin-resultados { color: var(--tv-suave); text-align: center; padding: 2rem 0; }
.tv-legal { color: var(--tv-suave); font-size: .8rem; text-align: center; margin: .5rem 0 0; }

/* ---------- ventanas: ficha y reproductor ---------- */
.tv-dialogo { color: var(--tv-texto); background: var(--tv-superficie); border: 1px solid var(--tv-borde); border-radius: var(--tv-radio); padding: 0;
  width: min(760px, 100vw - 1rem); max-height: calc(100dvh - 1rem); overflow-y: auto; }
.tv-dialogo::backdrop { background: rgb(2 6 18 / .82); }
.tv-detalle-cabeza { position: relative; }
.tv-detalle-cabeza img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: #000;
  mask-image: linear-gradient(#000 60%, transparent); -webkit-mask-image: linear-gradient(#000 60%, transparent); }
.tv-detalle-cabeza .tv-cerrar { position: absolute; top: .6rem; right: .6rem; }
.tv-detalle-cuerpo { padding: 0 1.1rem 1.2rem; margin-top: -2.5rem; position: relative; }
.tv-detalle-cuerpo h2 { margin: 0 0 .25rem; font-size: 1.5rem; }
.tv-meta { color: var(--tv-suave); font-size: .85rem; margin: 0 0 .6rem; }
.tv-detalle-cuerpo > p { margin: 0 0 1rem; }
.tv-temporadas { display: flex; gap: .4rem; overflow-x: auto; margin: 1.1rem 0 .4rem; padding-bottom: .2rem; }
.tv-chip { background: transparent; color: var(--tv-texto); border: 1px solid var(--tv-borde); border-radius: 999px; padding: .4rem .9rem; font: inherit; font-size: .88rem; white-space: nowrap; cursor: pointer; }
.tv-chip.activo { background: var(--tv-texto); color: var(--tv-fondo); border-color: var(--tv-texto); font-weight: 700; }
.tv-capitulos { list-style: none; margin: .6rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.tv-capitulo { display: flex; gap: .75rem; align-items: center; width: 100%; text-align: left; background: transparent; color: var(--tv-texto);
  border: 1px solid transparent; border-radius: 10px; padding: .35rem; cursor: pointer; font: inherit; }
.tv-capitulo:hover, .tv-capitulo:focus-visible { background: var(--tv-fondo); border-color: var(--tv-borde); }
.tv-capitulo.visto { border-color: var(--tv-acento); }
.tv-capitulo img { width: 132px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; flex: none; background: #000; }
.tv-capitulo span { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.tv-capitulo b { font-size: .92rem; line-height: 1.25; }
.tv-capitulo small { color: var(--tv-suave); font-size: .78rem; }
.tv-capitulo em { color: var(--tv-acento); font-size: .75rem; font-style: normal; font-weight: 700; }

.tv-reproductor { width: min(1100px, 100vw); max-width: 100vw; border-radius: 0; background: #000; }
@media (min-width: 700px) { .tv-reproductor { border-radius: var(--tv-radio); } }
.tv-video { aspect-ratio: 16 / 9; background: #000; }
.tv-video iframe, .tv-video > div { width: 100%; height: 100%; border: 0; display: block; }
.tv-aviso { margin: 0; padding: .55rem .9rem; background: #3b2a0b; color: #fde68a; font-size: .88rem; }
/* reproductor escondido que prueba los bloqueos por país (sin sonido, fuera de la pantalla) */
.tv-probador { position: fixed; left: -10000px; top: 0; width: 200px; height: 113px; opacity: 0; pointer-events: none; }
.tv-reproductor-barra { display: flex; align-items: center; gap: .6rem; padding: .7rem .9rem; background: var(--tv-superficie); }
.tv-reproductor-barra > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tv-reproductor-barra small { color: var(--tv-suave); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Recargas (próximamente, en gris) ---------- */
.tv-recargas { color: var(--tv-suave); background: var(--tv-superficie); border: 1px dashed var(--tv-borde); border-radius: var(--tv-radio);
  padding: 1.1rem 1.2rem; margin-top: 1.25rem; filter: grayscale(1); opacity: .7; user-select: none; }
.tv-pagina > .tv-recargas { max-width: calc(1100px - 2rem); margin-inline: auto; }
@media (max-width: 1132px) { .tv-pagina > .tv-recargas { margin-inline: 1rem; } }
.tv-recargas-cabeza { display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap; }
.tv-recargas h2 { margin: 0; font-size: 1.1rem; color: var(--tv-texto); }
.tv-recargas p { margin: .5rem 0 .8rem; }
.tv-pronto { border: 1px solid currentColor; border-radius: 999px; padding: .15rem .6rem; font-size: .72rem; font-weight: 800; letter-spacing: .06em; }
.tv-operadoras { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; margin: 0; padding: 0; }
.tv-operadoras li { border: 1px solid var(--tv-borde); border-radius: 8px; padding: .3rem .7rem; font-size: .85rem; }

/* pestañas del portal */
.cliente-tabs .cliente-tab-tv { color: var(--tv-acento, #38bdf8); }
.cliente-tabs .cliente-tab-pronto { opacity: .45; filter: grayscale(1); }
.cliente-tabs .cliente-tab-pronto::after { content: "PRONTO"; display: block; font-size: .58rem; font-weight: 700; letter-spacing: .05em; margin-top: -.15rem; }
.cliente-tabs a { padding-inline: .35rem; }

@media (prefers-reduced-motion: reduce) { .tv-tarjeta { transition: none; } }

/* selector Series / Recargas arriba a la derecha (página pública): se cambia de sección sin bajar */
.tv-selector { display: flex; background: var(--tv-superficie); border: 1px solid var(--tv-borde); border-radius: 999px; padding: 3px; gap: 2px; flex: none; }
.tv-selector a { padding: .4rem .65rem; border-radius: 999px; text-decoration: none; color: var(--tv-suave); font-weight: 700; font-size: .84rem; white-space: nowrap; min-height: 36px; display: flex; align-items: center; }
.tv-selector a.activo { background: var(--tv-acento); color: var(--tv-acento-texto); }
.tv-selector a.tv-selector-pronto:not(.activo) { opacity: .6; }
.tv-soy-cliente { margin-top: .9rem; min-height: 40px; padding: .45rem 1rem; font-size: .9rem; }
.tv-pagina [data-tv-panel="recargas"] .tv-recargas { margin-top: 1rem; }
@media (max-width: 360px) { .tv-logo b { display: none; } }
.tv-barra { gap: .5rem; }
@media (max-width: 400px) { .tv-logo { font-size: 1rem; gap: .35rem; } }

/* controles de ForceNet: debajo del video (nunca encima) */
.tv-pantalla { background: #000; display: flex; flex-direction: column; }
.tv-pantalla:fullscreen { justify-content: center; }
.tv-pantalla:fullscreen .tv-video { aspect-ratio: auto; flex: 1; }
.tv-controles { display: flex; align-items: center; gap: .5rem; padding: .45rem .7rem; background: #05070d; color: var(--tv-texto); }
.tv-controles[hidden] { display: none; }
.tv-controles button { background: transparent; border: 0; color: var(--tv-texto); font-size: 1.15rem; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; flex: none; }
.tv-controles button:hover, .tv-controles button:focus-visible { background: var(--tv-superficie); }
.tv-controles input[type=range] { flex: 1; min-width: 60px; accent-color: var(--tv-acento); height: 28px; cursor: pointer; }
.tv-tiempo { font-size: .78rem; color: var(--tv-suave); white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 400px) { .tv-tiempo { display: none; } }

/* reproductor arriba del todo y los capítulos debajo (como una app de series) */
.tv-reproductor { margin: 0 auto auto; height: 100dvh; max-height: 100dvh; overflow: hidden; }
.tv-reproductor[open] { display: flex; flex-direction: column; }
.tv-reproductor > .tv-pantalla, .tv-reproductor > .tv-aviso, .tv-reproductor > .tv-reproductor-barra { flex: none; }
.tv-r-lista { flex: 1; overflow-y: auto; background: var(--tv-superficie); padding: 0 .9rem 1rem; border-top: 1px solid var(--tv-borde); }
.tv-r-lista .tv-temporadas { margin: .8rem 0 .2rem; }
.tv-capitulo[aria-current] { background: var(--tv-fondo); }
@media (min-width: 700px) { .tv-reproductor { margin-top: 1rem; height: calc(100dvh - 2rem); max-height: calc(100dvh - 2rem); } }

/* pantalla de pausa de ForceNet (cubre el video solo cuando está en pausa) */
.tv-video-caja { position: relative; }
.tv-pantalla:fullscreen .tv-video-caja { flex: 1; display: flex; }
.tv-pantalla:fullscreen .tv-video-caja .tv-video { flex: 1; }
.tv-pausa { position: absolute; inset: 0; border: 0; padding: 0; cursor: pointer; background: #000; color: #fff; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: .6rem; overflow: hidden; font: inherit; }
.tv-pausa[hidden] { display: none; }
.tv-pausa img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.45) blur(1px); }
.tv-pausa-play { position: relative; width: 72px; height: 72px; border-radius: 50%; background: var(--tv-acento); color: var(--tv-acento-texto);
  display: flex; align-items: center; justify-content: center; font-size: 1.9rem; padding-left: 6px; box-shadow: 0 6px 24px rgb(0 0 0 / .5); }
.tv-pausa b { position: relative; max-width: 90%; text-align: center; font-size: .95rem; text-shadow: 0 1px 4px #000; }
