/* ──────────────────────────────────────────────────────────────────
 * HALLO Webplayer — Live (Lite UI, espelha Android Lite)
 * Player fullscreen + overlays que cobrem com transparencia
 * ──────────────────────────────────────────────────────────────── */

#main-content:has(.live-lite) {
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden;
}

.live-lite {
    position: fixed;
    inset: 0;
    background: #000;
    overflow: hidden;
    z-index: 100;
}

/* ─── Player ─────────────────────────────────────────────────────── */
.live-lite-player-wrap {
    position: absolute;
    inset: 0;
    background: #000;
}

.live-lite-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.live-lite-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.6);
    z-index: 50;
}

.live-lite-loading .spinner {
    width: 48px; height: 48px;
    border: 3px solid rgba(255,255,255,0.15);
    border-top-color: #fff;
    border-radius: 50%;
    animation: lite-spin 0.9s linear infinite;
}

@keyframes lite-spin { to { transform: rotate(360deg); } }

/* ─── Info bar (bottom, auto-hide 5s) ────────────────────────────── */
.live-lite-info-bar {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 64px;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.85) 100%);
    display: flex;
    align-items: center;
    padding: 0 24px;
    color: #fff;
    z-index: 200;
    transition: opacity 0.25s, transform 0.25s;
}
.live-lite-info-bar.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}
.live-lite-info-number {
    font-size: 22px;
    font-weight: 700;
    color: #ffcc00;
    margin-right: 16px;
    min-width: 50px;
}
.live-lite-info-logo {
    width: 44px; height: 32px;
    object-fit: contain;
    margin-right: 12px;
}
.live-lite-info-name {
    font-size: 18px;
    font-weight: 600;
}
.live-lite-info-program {
    margin-left: auto;
    color: #b3b3b3;
    font-size: 14px;
    max-width: 50%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ─── Overlay genres+channels (CENTER, auto-hide 15s) ────────────── */
.live-lite-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    z-index: 300;
    transition: opacity 0.2s;
}
.live-lite-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.lite-col-genres {
    width: 220px;
    background: linear-gradient(90deg, rgba(16,16,32,0.95) 0%, rgba(16,16,32,0.92) 100%);
    overflow-y: auto;
    padding: 12px 0;
    border-right: 1px solid rgba(255,255,255,0.06);
}
.lite-col-channels {
    width: 360px;
    background: linear-gradient(90deg, rgba(21,21,48,0.95) 0%, rgba(21,21,48,0.92) 100%);
    overflow-y: auto;
    padding: 12px 0;
    border-right: 1px solid rgba(255,255,255,0.06);
}
.lite-col-fill {
    flex: 1;
    cursor: pointer;
}

.lite-genre-item {
    padding: 12px 20px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.lite-genre-item:hover, .lite-genre-item:focus {
    background: rgba(255,255,255,0.08);
    outline: none;
}
.lite-genre-item.active {
    color: #ffcc00;
    background: rgba(255,204,0,0.06);
}

.lite-channel-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    color: #fff;
    cursor: pointer;
    transition: background 0.15s;
    gap: 12px;
}
.lite-channel-item:hover, .lite-channel-item:focus {
    background: rgba(255,255,255,0.08);
    outline: none;
}
.lite-channel-item.current .lite-channel-num,
.lite-channel-item.current .lite-channel-name {
    color: #ffcc00;
}
.lite-channel-num {
    font-weight: 700;
    font-size: 14px;
    color: #999;
    min-width: 42px;
}
.lite-channel-logo {
    width: 44px; height: 32px;
    object-fit: contain;
    flex-shrink: 0;
}
.lite-channel-name {
    flex: 1;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.lite-channel-genre {
    font-size: 11px;
    color: #888;
}

/* ─── Tools panel (LEFT, auto-hide 12s) ──────────────────────────── */
.live-lite-tools {
    position: absolute;
    top: 0; bottom: 0; left: 0;
    width: 240px;
    background: linear-gradient(90deg, rgba(16,24,40,0.96) 0%, rgba(16,24,40,0.5) 100%);
    padding: 24px 16px;
    z-index: 350;
    transition: transform 0.2s, opacity 0.2s;
    color: #fff;
}
.live-lite-tools.hidden {
    transform: translateX(-100%);
    opacity: 0;
    pointer-events: none;
}
.lite-tools-title {
    font-size: 12px;
    color: #888;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.lite-tool-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
    margin-bottom: 4px;
    gap: 14px;
}
.lite-tool-item:hover, .lite-tool-item:focus {
    background: rgba(255,255,255,0.1);
    outline: none;
}
.lite-tool-icon {
    width: 32px;
    text-align: center;
    font-size: 20px;
}
.lite-tool-icon.cc {
    color: #00ccff;
    font-weight: 700;
    font-size: 16px;
}
.lite-tool-icon.fav { color: #ffcc00; font-size: 22px; }
.lite-tool-text {
    flex: 1;
}
.lite-tool-label {
    font-size: 14px;
    font-weight: 600;
}
.lite-tool-sublabel {
    font-size: 11px;
    color: #999;
}

/* ─── EPG panel (RIGHT, auto-hide 12s) ───────────────────────────── */
.live-lite-epg {
    position: absolute;
    top: 0; bottom: 0; right: 0;
    width: 380px;
    background: linear-gradient(270deg, rgba(16,24,40,0.96) 0%, rgba(16,24,40,0.5) 100%);
    padding: 24px;
    overflow-y: auto;
    z-index: 350;
    transition: transform 0.2s, opacity 0.2s;
    color: #fff;
}
.live-lite-epg.hidden {
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
}
.lite-epg-channel-name {
    color: #00ccaa;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}
.lite-epg-channel-num {
    color: #888;
    font-size: 12px;
    margin-bottom: 14px;
}
.lite-epg-poster {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 12px;
}
.lite-epg-live-badge {
    display: inline-block;
    background: rgba(0,204,68,0.85);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 3px;
    margin-right: 8px;
}
.lite-epg-time {
    color: #00ccff;
    font-size: 13px;
    display: inline-block;
    vertical-align: middle;
}
.lite-epg-title {
    font-size: 20px;
    font-weight: 700;
    margin-top: 8px;
    line-height: 1.3;
}
.lite-epg-desc {
    font-size: 13px;
    color: #b3b3b3;
    margin-top: 8px;
    line-height: 1.5;
}
.lite-epg-divider {
    height: 1px;
    background: rgba(255,255,255,0.12);
    margin: 18px 0 12px;
}
.lite-epg-next-label {
    color: #888;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}
.lite-epg-next-time {
    color: #00ccff;
    font-size: 12px;
}
.lite-epg-next-title {
    font-size: 15px;
    font-weight: 600;
    margin-top: 4px;
}

/* Esconder sidebar + menu-gutter quando live-lite ativa */
body.live-lite-active #sidebar,
body.live-lite-active #menu-gutter,
body.live-lite-active #menu-scrim {
    display: none !important;
}
body.live-lite-active #main-content {
    margin: 0 !important;
    padding: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
}

/* ─── Legendas TTML/STPP (Custom TextDisplayer) ─────────────── */
.live-lite-subtitle-overlay {
    position: absolute;
    bottom: 10%;
    left: 10%;
    right: 10%;
    text-align: center;
    pointer-events: none;
    z-index: 15;
    line-height: 1.8;
}
.live-lite-subtitle-line {
    display: inline-block;
    background: rgba(0, 0, 0, 0.75);
    color: #ffd200 !important;
    -webkit-text-fill-color: #ffd200 !important;
    font-size: 24px;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 4px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.9);
}
/* Override spans/tags que STPP injeta inline com color:#FFF dentro do overlay custom */
.live-lite-subtitle-overlay *,
.live-lite-subtitle-line * {
    color: #ffd200 !important;
    -webkit-text-fill-color: #ffd200 !important;
}

/* ─── Ad slots nos painéis laterais ───────────────────────────── */
.lite-ad-slot {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 16px;
    min-height: 520px;
    background: rgba(0,0,0,0.35);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.05);
}
.lite-ad-slot::before {
    content: 'Publicidade';
    position: absolute;
    top: 4px;
    left: 10px;
    font-size: 9px;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
    letter-spacing: 1px;
    pointer-events: none;
    z-index: 1;
}
.lite-ad-slot .adsbygoogle {
    width: 100%;
    min-height: 520px;
}

/* Reservar espaço no painel tools/epg para o slot não sobrepor o conteudo */
.live-lite-tools { padding-bottom: 560px !important; }
.live-lite-epg { padding-bottom: 560px !important; }

/* Corner ad (canto inferior direito) */
.lite-corner-ad {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 300px;
    height: 250px;
    z-index: 500;
    background: rgba(16,24,40,0.95);
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 6px 24px rgba(0,0,0,0.5);
    overflow: hidden;
    transition: opacity 0.2s, transform 0.2s;
}
.lite-corner-ad.hidden {
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
}
.lite-corner-ad-close {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 26px;
    height: 26px;
    border: none;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 18px;
    line-height: 1;
    border-radius: 50%;
    cursor: pointer;
    z-index: 2;
}
.lite-corner-ad-close:hover, .lite-corner-ad-close:focus {
    background: rgba(0,0,0,0.85);
    outline: none;
}
.lite-corner-ad-slot {
    width: 300px;
    height: 250px;
}

/* Pre-roll overlay */
.lite-preroll-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #000;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
.lite-preroll-overlay.hidden { display: none; }
.lite-preroll-label {
    position: absolute;
    top: 18px;
    right: 22px;
    padding: 6px 12px;
    background: rgba(255,255,255,0.15);
    color: #fff;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 4px;
}
.lite-preroll-video {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    background: #000;
}
.lite-preroll-skip {
    position: absolute;
    bottom: 32px;
    right: 32px;
    padding: 10px 18px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
    cursor: pointer;
    font-size: 14px;
    border-radius: 4px;
    display: none;
}
.lite-preroll-skip.visible { display: block; }
