
/* ==========================================
   UCE TV - Reproductor institucional
   Centro Médico UCE
========================================== */

:root {
    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

body {
    background: #061c34;
    color: #ffffff;
    font-family: Arial, Helvetica, sans-serif;
}

.tv-screen {
    position: relative;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    background: #061c34;
}

/* Reproductor de publicidad */

#tvPlayer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000000;
    display: none;
}

/* Pantalla institucional de respaldo */

.tv-placeholder {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    text-align: center;
    background: linear-gradient(
        135deg,
        #061c34 0%,
        #103b65 55%,
        #071a30 100%
    );
}

.tv-placeholder h1 {
    margin: 0 0 18px;
    font-size: clamp(32px, 5vw, 78px);
    font-weight: 800;
    letter-spacing: 3px;
}

.tv-placeholder p {
    margin: 0;
    font-size: clamp(16px, 2vw, 30px);
    color: #d9e7f5;
    letter-spacing: 2px;
}

/* Indicador de estado temporal */

.tv-status {
    position: absolute;
    right: 20px;
    bottom: 20px;
    z-index: 5;
    padding: 10px 16px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.65);
    color: #ffffff;
    font-size: 14px;
    pointer-events: none;
}

/* Cuando existe un video listo */

.tv-screen.is-playing #tvPlayer {
    display: block;
}

.tv-screen.is-playing .tv-placeholder {
    display: none;
}

/* Ocultar indicador durante reproducción normal */

.tv-status.is-hidden {
    display: none;
}

/* UCE TV — Reproductor doble */

.tv-screen {
    position: relative;
    overflow: hidden;
    background: #000;
}

.tv-screen video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
    opacity: 0;
    visibility: hidden;
}

.tv-screen video.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.tv-placeholder {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.tv-placeholder.is-hidden {
    display: none;
}

.tv-status {
    position: absolute;
    z-index: 3;
}