/* ============================================================
   Orientação do Dirigente Espiritual — modal de áudio (estático)
   ------------------------------------------------------------
   Card público "estilo Culto Mensal": botão no header → modal
   compacto com player nativo. Sem login, sem Supabase. Reusa as
   variáveis de tema (--n-*) e as fontes pra casar com o site.
   Espelha o "Recomendar Áudio" do Caminho da Felicidade, mas aqui
   visível pra qualquer visitante (o Guia é público).
   ============================================================ */

#orientacaoModal {
    position: fixed;
    top: 52px; /* abaixo do header do site (h-52) — ele continua visível no topo */
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

#orientacaoModal.is-open {
    display: flex;
}

#orientacaoBackdrop {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
}

html.dark #orientacaoBackdrop {
    background: rgba(0, 0, 0, 0.92);
}

/* Card compacto centralizado (não é fullscreen — é só um áudio) */
#orientacaoCard {
    position: relative;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    background: var(--n-bg, #ffffff);
    color: var(--n-text, #1c1917);
    border: 1px solid var(--n-border, #e5e7eb);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

#orientacaoHeader {
    flex: none;
    padding: 12px 20px;
    border-bottom: 1px solid var(--n-border, #e5e7eb);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

#orientacaoHeader .od-category {
    font-family: 'Outfit', sans-serif;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--n-muted, #6b7280);
}

#btnOrientacaoClose {
    width: 36px;
    height: 36px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--n-muted, #6b7280);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

#btnOrientacaoClose:hover {
    color: var(--n-text, #1c1917);
    background: var(--n-border, rgba(0, 0, 0, 0.05));
}

#orientacaoContent {
    flex: 1;
    overflow-y: auto;
    padding: 2rem 1.5rem 2.5rem;
    text-align: center;
}

.od-doc-header {
    margin-bottom: 1.75rem;
}

.od-title {
    font-family: 'Crimson Pro', 'Noto Serif JP', serif;
    font-size: clamp(22px, 3vw, 28px);
    font-weight: 500;
    line-height: 1.25;
    color: var(--n-text, #1c1917);
    margin: 0 0 10px 0;
}

.od-date {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--n-muted, #6b7280);
    margin: 0;
}

/* Player nativo (mesmo tratamento de cantos do áudio do Culto Mensal) */
#orientacaoAudioEl {
    width: 100%;
    height: 44px;
    border-radius: 2px;
    clip-path: inset(0 round 2px);
}

#orientacaoAudioEl::-webkit-media-controls-enclosure,
#orientacaoAudioEl::-webkit-media-controls-panel {
    border-radius: 2px;
}

.od-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 1.5rem;
    padding: 9px 16px;
    border: 1px solid var(--n-border, #e5e7eb);
    border-radius: 2px;
    color: var(--n-muted, #6b7280);
    text-decoration: none;
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.18s, color 0.18s, border-color 0.18s;
}

.od-download:hover {
    background: var(--n-border, rgba(0, 0, 0, 0.04));
    color: var(--n-text, #1c1917);
}

/* Estado "baixando": feedback visual + bloqueia re-clique por alguns segundos. */
.od-download.is-downloading {
    opacity: 0.6;
    pointer-events: none;
    cursor: default;
}

/* Timbre: logo (cruz messiânica) centralizado no header do modal. */
.od-logo {
    display: block;
}

/* Badge "novo" no botão envelope do header — unifica Culto + Dirigente.
   Posicionado sobre o botão (que é position:relative). */
#orientacoesBadge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 15px;
    height: 15px;
    padding: 0 4px;
    background: #ef4444;
    color: #ffffff;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 2px var(--n-bg, #ffffff);
    pointer-events: none;
}

#orientacoesBadge.hidden {
    display: none;
}

/* Etiqueta "NOVO" em cada item do menu não-visto. */
.od-new-pill {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    font-family: 'Outfit', sans-serif;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #ffffff;
    background: #ef4444;
    padding: 2px 6px;
    border-radius: 9999px;
}

.od-new-pill.hidden {
    display: none;
}

/* Carta aberta: o header do site continua visível (logo/marca), mas seus botões
   de ação ficam apagados e inertes — clicá-los abriria popovers ATRÁS da carta.
   Fechar a carta (× ou clicar no fundo) reativa tudo. body.orient-open é
   togglado em orientacao-dirigente.js. */
#site-header-actions {
    transition: opacity 0.2s ease;
}

body.orient-open #site-header-actions {
    opacity: 0.35;
    pointer-events: none;
}
