/**
 * TV AchaTudo — o canal da cidade (v6, ADR-0031)
 * Prefixo tv- (constituição, seção 8). Palco escuro: o vídeo é a estrela.
 * Mobile-first: coluna única; no desktop o player ocupa 2/3 e "A seguir" 1/3.
 */

.pagina-tv main {
    background: #10141d;
}

.tv-palco {
    color: #e8ecf4;
    min-height: 70vh;
}

.tv-titulo {
    font-weight: 800;
    font-size: 1.35rem;
    color: #fff;
}

.tv-subtitulo {
    color: #9aa4b5;
}

/* Selo "NO AR" com ponto pulsante */
.tv-badge-aovivo {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    background: rgba(220, 53, 69, .15);
    border: 1px solid rgba(220, 53, 69, .45);
    color: #ff6b7a;
    font-weight: 700;
    font-size: .8rem;
    letter-spacing: .08em;
    padding: .3rem .7rem;
    border-radius: 999px;
}

.tv-ponto {
    width: .55rem;
    height: .55rem;
    border-radius: 50%;
    background: #ff4757;
    animation: tv-pulsar 1.6s ease-in-out infinite;
}

@keyframes tv-pulsar {
    0%, 100% { opacity: 1; }
    50% { opacity: .35; }
}

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

/* ── Player ─────────────────────────────────────────────── */

.tv-player-moldura {
    position: relative;
    background: #000;
    border-radius: 14px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .55);
}

.tv-player {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: #000;
}

/* Rótulo obrigatório nas peças publicitárias (CONAR — padrão ADR-0024) */
.tv-selo-publicidade {
    position: absolute;
    top: .65rem;
    left: .65rem;
    background: rgba(0, 0, 0, .65);
    color: #fff;
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: .2rem .5rem;
    border-radius: 4px;
    pointer-events: none;
}

/* Autoplay bloqueado (Data Saver, economia de bateria) → convite explícito */
.tv-botao-play {
    position: absolute;
    inset: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    background: rgba(10, 12, 18, .72);
    color: #fff;
    border: 0;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
}

.tv-botao-play-icone {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.2rem;
    height: 3.2rem;
    border-radius: 50%;
    background: var(--achatudo-primaria, #7C3AED);
    font-size: 1.15rem;
}

.tv-controles {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .5rem .65rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, .75));
}

.tv-controles-direita {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.tv-controle {
    background: rgba(0, 0, 0, .55);
    border: 1px solid rgba(255, 255, 255, .25);
    color: #fff;
    font-size: .8rem;
    padding: .3rem .65rem;
    border-radius: 999px;
    cursor: pointer;
    text-decoration: none;
}

.tv-controle:hover {
    background: rgba(255, 255, 255, .18);
    color: #fff;
}

/* Faixa "No ar agora" sob o player */
.tv-faixa-agora {
    display: flex;
    align-items: baseline;
    gap: .6rem;
    flex-wrap: wrap;
    padding: .8rem .35rem 0;
}

.tv-faixa-rotulo {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #ff6b7a;
    white-space: nowrap;
}

.tv-faixa-titulo {
    font-weight: 700;
    color: #fff;
}

.tv-faixa-tipo {
    font-size: .75rem;
    color: #9aa4b5;
}

/* ── "A seguir" ─────────────────────────────────────────── */

.tv-aseguir {
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 14px;
    padding: 1.1rem 1.2rem;
}

.tv-aseguir-titulo {
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #9aa4b5;
    margin-bottom: .8rem;
}

.tv-aseguir-lista {
    margin: 0;
    padding-left: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: .55rem;
}

.tv-aseguir-lista li::marker {
    color: #9aa4b5;
}

.tv-aseguir-nome {
    display: block;
    font-weight: 600;
    color: #e8ecf4;
}

.tv-aseguir-tipo {
    font-size: .72rem;
    color: #9aa4b5;
}

/* ── Corte para a LiveShop AO VIVO (Etapa 2) ────────────── */

.tv-aovivo {
    position: absolute;
    inset: 0;
    background: #000;
}

.tv-aovivo-iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.tv-link-live {
    font-weight: 700;
    color: #ff6b7a;
    text-decoration: none;
    white-space: nowrap;
}

.tv-link-live:hover {
    color: #ff8a95;
}

/* ── Modo mídia indoor (?modo=tela — a TV da loja) ──────── */

body.tv-modo-tela {
    background: #000;
}

.tv-palco-tela {
    min-height: 100vh;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: .5rem;
}

.tv-tela-envelope {
    width: 100%;
    /* o player 16:9 cabe na altura da tela, sobrando a faixa "no ar" */
    max-width: min(100vw, calc((100vh - 4.5rem) * 16 / 9));
}

.tv-palco-tela .tv-player-moldura {
    border-radius: 0;
    box-shadow: none;
}

/* ── Mini-player flutuante (PiP comedido — home e portal) ─ */

.tv-pip {
    position: fixed;
    right: .9rem;
    bottom: .9rem;
    width: min(300px, calc(100vw - 1.8rem));
    z-index: 1040; /* acima do conteúdo, abaixo de modais */
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 10px 32px rgba(0, 0, 0, .45);
}

.tv-pip-faixa {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    background: #10141d;
    padding: .3rem .3rem .3rem .65rem;
}

.tv-pip-nome {
    color: #e8ecf4;
    font-size: .78rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tv-pip-nome:hover {
    color: #fff;
}

.tv-pip-botoes {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.tv-pip-fechar,
.tv-chip-fechar {
    background: none;
    border: 0;
    color: #9aa4b5;
    font-size: .85rem;
    line-height: 1;
    padding: .25rem .45rem;
    cursor: pointer;
}

.tv-pip-fechar:hover,
.tv-chip-fechar:hover {
    color: #fff;
}

.tv-pip-quadro {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    background: #000;
}

.tv-pip-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.tv-pip-convite {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: .95rem;
    background: linear-gradient(135deg, #1a2340, #10141d);
}

/* ── Chip "TV no ar" (demais páginas públicas) ──────────── */

.tv-chip {
    position: fixed;
    right: .9rem;
    bottom: .9rem;
    z-index: 1040;
    display: inline-flex;
    align-items: center;
    background: #10141d;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 999px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .3);
    padding-left: .35rem;
}

.tv-chip-link {
    color: #e8ecf4;
    font-size: .8rem;
    font-weight: 700;
    text-decoration: none;
    padding: .45rem .25rem .45rem .45rem;
    white-space: nowrap;
}

.tv-chip-link:hover {
    color: #fff;
}

/* ── Estado vazio (cidade sem canal) ────────────────────── */

.tv-vazio {
    background: rgba(255, 255, 255, .04);
    border: 1px dashed rgba(255, 255, 255, .18);
    border-radius: 14px;
}

.tv-vazio-icone {
    font-size: 2.4rem;
}

@media (min-width: 992px) {
    .tv-titulo {
        font-size: 1.6rem;
    }
}
