/* ============================================================
   ACABAMENTO EDITORIAL
   Camada carregada depois de assets/style.php. Só vale quando o
   <body> tem a classe .acab-editorial (Configurações > Fontes).
   Para voltar ao visual antigo: acabamento = "Clássico".

   O que ela faz:
   - tipografia própria da rádio (--font-titulo / --font-texto)
   - cores chapadas no lugar de degradês
   - sem vidro desfocado, sem brilho, sem sombra em coisa parada
   - título de seção grande, sem o ícone dentro de um quadradinho
   - cantos definidos pela rádio (--raio)
   ============================================================ */

body.acab-editorial {
    --primary-gradient: var(--primary);
    --glass: var(--conteudo, var(--bg));
    font-family: var(--font-texto);
    font-size: var(--fs-md, 1rem);
    line-height: 1.6;
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* ── Tipografia ─────────────────────────────────────────────── */
body.acab-editorial h1,
body.acab-editorial h2,
body.acab-editorial h3,
body.acab-editorial h4,
body.acab-editorial .hero-title,
body.acab-editorial .page-header-title,
body.acab-editorial .programa-mini-title,
body.acab-editorial .section-title {
    font-family: var(--font-titulo);
    letter-spacing: -0.015em;
    line-height: 1.2;
    text-wrap: balance;
}

body.acab-editorial p,
body.acab-editorial li {
    text-wrap: pretty;
}

/* Texto em degradê vira texto sólido */
body.acab-editorial .hero-title,
body.acab-editorial .programa-horario .hora,
body.acab-editorial .programa-mini-title {
    background: none !important;
    -webkit-background-clip: border-box !important;
    background-clip: border-box !important;
    -webkit-text-fill-color: currentColor !important;
    color: var(--titulos) !important;
}
body.acab-editorial .programa-horario .hora { color: var(--primary-texto, var(--primary)) !important; }

/* ── Cabeçalho de seção (page-header.php) ───────────────────── */
body.acab-editorial .page-header-bar {
    display: block;
    margin: 0 0 var(--esp-5, 24px);
    padding: 0;
    border: 0;
    box-shadow: none;
}
body.acab-editorial .page-header-bar::after {
    content: '';
    display: block;
    width: 48px;
    height: 4px;
    margin-top: 14px;
    background: var(--primary);
    border-radius: 0;
}
body.acab-editorial .page-header-icon { display: none !important; }
body.acab-editorial .page-header-title {
    font-size: var(--fs-2xl, 1.75rem);
    font-weight: 800;
    color: var(--titulos);
    margin: 0;
}
body.acab-editorial .page-header-sub {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 6px 0 0;
    max-width: 60ch;
}

/* ── Vidro, brilho e sombra ─────────────────────────────────── */
body.acab-editorial *,
body.acab-editorial *::before,
body.acab-editorial *::after {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}
body.acab-editorial #player-root,
body.acab-editorial .main-header,
body.acab-editorial .main-header-t2 {
    box-shadow: none;
}

/* Blocos de conteúdo: cor chapada, um degrau de tom acima do fundo */
body.acab-editorial .info-card,
body.acab-editorial .locutor-card,
body.acab-editorial .programa-card,
body.acab-editorial .umt-box,
body.acab-editorial .noar-mini-card,
body.acab-editorial .top-musicas-container,
body.acab-editorial .enquete-container,
body.acab-editorial .recados-container,
body.acab-editorial .pod-card,
body.acab-editorial .album-card,
body.acab-editorial .eq-card,
body.acab-editorial .sidebar-card,
body.acab-editorial .noticiabox-card,
body.acab-editorial .postagensbox-card,
body.acab-editorial .camstudio {
    background: var(--conteudo) !important;
    background-image: none !important;
    border: 0 !important;
    box-shadow: none !important;
    border-radius: var(--raio) !important;
}
body.acab-editorial .info-card:hover,
body.acab-editorial .pod-card:hover,
body.acab-editorial .album-card:hover,
body.acab-editorial .noticiabox-card:hover,
body.acab-editorial .postagensbox-card:hover {
    transform: none !important;
    box-shadow: none !important;
    background: var(--superficie-hover, var(--conteudo)) !important;
}
body.acab-editorial .programa-card::before { display: none !important; }
body.acab-editorial .programa-card.no-ar {
    background: color-mix(in srgb, var(--conteudo) 80%, var(--primary)) !important;
}

/* Imagens: cantos da rádio, sem sombra */
body.acab-editorial .news-image-home,
body.acab-editorial .umt-cover,
body.acab-editorial .slider-container {
    border-radius: var(--raio);
    box-shadow: none;
}
body.acab-editorial .news-image-home { background: var(--conteudo); }

/* ── Botões: uma cor, sem degradê, sem flutuar ─────────────── */
body.acab-editorial .btn-primary,
body.acab-editorial .btn-votar,
body.acab-editorial .filtro-btn.active {
    background: var(--primary) !important;
    background-image: none !important;
    border-color: var(--primary) !important;
    box-shadow: none !important;
    color: var(--bg) !important;
}
body.acab-editorial .player-btn-play {
    background: var(--pl-botao, var(--primary)) !important;
    background-image: none !important;
    border-color: var(--pl-botao, var(--primary)) !important;
    box-shadow: none !important;
    color: var(--pl-botao-texto, var(--bg)) !important;
}
body.acab-editorial .btn-primary:hover,
body.acab-editorial .btn-votar:hover {
    transform: none !important;
    filter: brightness(1.08);
}
body.acab-editorial .btn,
body.acab-editorial .btn-votar,
body.acab-editorial .filtro-btn {
    border-radius: var(--raio);
    font-family: var(--font-texto);
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
}
body.acab-editorial .resultado-barra {
    background: var(--primary) !important;
    background-image: none !important;
}
body.acab-editorial .social-links a:hover {
    background: var(--primary) !important;
    background-image: none !important;
    box-shadow: none !important;
}

/* Rótulos em caixa alta espaçada viram texto normal */
body.acab-editorial .programa-horario,
body.acab-editorial .noticiabox-badge,
body.acab-editorial .postagensbox-badge {
    text-transform: none !important;
    letter-spacing: 0 !important;
}

/* ── Ritmo da página ────────────────────────────────────────── */
body.acab-editorial .news-music-section { padding-top: 40px; padding-bottom: 40px; }

/* ── Foco visível em tudo que é clicável ────────────────────── */
body.acab-editorial a:focus-visible,
body.acab-editorial button:focus-visible,
body.acab-editorial [tabindex]:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    body.acab-editorial *,
    body.acab-editorial *::before,
    body.acab-editorial *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}

/* ============================================================
   CORES EM TODO LUGAR (vale para os dois acabamentos)
   Rodapé, aviso de cookies, crédito e botões usam as cores do estilo.
   ============================================================ */
body { color: var(--text-primary); }

.main-footer {
    background: var(--rodape) !important;
    color: color-mix(in srgb, var(--rodape) 25%, #ffffff);
    border-top: 0 !important;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}
.main-footer p { color: inherit; margin: 0; }
.main-footer .social-links a {
    background: color-mix(in srgb, var(--rodape) 85%, #ffffff);
    border: 0;
    color: inherit;
}
.main-footer .social-links a:hover {
    background: var(--primary);
    color: var(--sobre-primaria);
    box-shadow: none;
    transform: none;
}
.main-footer .dev-credit { border-top-color: color-mix(in srgb, var(--rodape) 80%, #ffffff); }
.main-footer .dev-credit .dev-credit-badge { background: var(--primary); color: var(--sobre-primaria); }
.footer-nome { font-family: var(--font-titulo); font-weight: 800; font-size: 1.15rem; color: #fff; display: block; margin-bottom: 2px; }
/* Rodapé claro (raro): texto escuro */
body.rodape-claro .main-footer { color: color-mix(in srgb, var(--rodape) 25%, #000000); }
body.rodape-claro .footer-nome { color: #111; }

#cookieConsent {
    background: var(--rodape) !important;
    border-top: 0 !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}
#cookieConsent { color: color-mix(in srgb, var(--rodape) 20%, #ffffff); }
#cookieConsent .cc-message { color: inherit; }
body.rodape-claro #cookieConsent { color: #222; }
body.rodape-claro #cookieDeny { border-color: rgba(0,0,0,.2); }
#cookieAccept { background: var(--primary) !important; color: var(--sobre-primaria) !important; box-shadow: none !important; }

body.acab-editorial .btn-primary,
body.acab-editorial .btn-votar,
body.acab-editorial .filtro-btn.active { color: var(--sobre-primaria) !important; }

/* ============================================================
   FUNDO BRANCO (body.tema-claro)
   Componentes antigos com texto branco fixo passam a usar a tinta do estilo.
   Texto sobre foto (slider, galeria) continua branco.
   ============================================================ */
body.tema-claro .info-content h3,
body.tema-claro .info-content p,
body.tema-claro .locutor-info h3,
body.tema-claro .horario,
body.tema-claro .visitantes-info h4,
body.tema-claro .stat-number,
body.tema-claro .stat-label,
body.tema-claro .info-icon i,
body.tema-claro .section-title i,
body.tema-claro .section-subtitle i,
body.tema-claro .news-date i,
body.tema-claro .galeria-vazio i,
body.tema-claro .pod-empty i,
body.tema-claro .recado-avatar i { color: var(--text-primary) !important; }

body.tema-claro .t2-toggler span,
body.tema-claro .navbar-toggler-icon { background-color: var(--text-primary); }
body.tema-claro .navbar-toggler { border-color: var(--glass-border); }
body.tema-claro .navbar-toggler-icon {
    background-image: none;
    height: 2px;
    box-shadow: 0 -7px 0 var(--text-primary), 0 7px 0 var(--text-primary);
}

/* Superfícies: um degrau de cinza no lugar do branco translúcido */
body.tema-claro .info-card,
body.tema-claro .locutor-card,
body.tema-claro .programa-card,
body.tema-claro .noticiabox-card,
body.tema-claro .postagensbox-card,
body.tema-claro .umt-box,
body.tema-claro .top-musicas-container,
body.tema-claro .enquete-container,
body.tema-claro .recados-container { background: var(--conteudo) !important; border-color: var(--glass-border) !important; }

body.tema-claro .player-spinner { border-color: rgba(0, 0, 0, .12); }
body.tema-claro .form-control,
body.tema-claro .form-select,
body.tema-claro textarea,
body.tema-claro input[type="text"],
body.tema-claro input[type="email"] {
    background: #fff;
    color: var(--text-primary);
    border-color: var(--glass-border);
}
body.tema-claro .form-control::placeholder,
body.tema-claro textarea::placeholder { color: var(--text-secondary); }
body.tema-claro ::-webkit-scrollbar-track { background: #f1f1f1; }
