/*
 * V1082 — camada final de integridade dos temas públicos.
 * Carregada depois do CSS sazonal para impedir que regras antigas com
 * !important reativem efeitos ou mantenham cores do tema verde.
 */

/* O consentimento continua acima dos elementos flutuantes, mas nunca disputa
 * a camada máxima com o modal obrigatório de termos. */
body .cookie-consent,
.cookie-consent {
    z-index: 2147483500 !important;
}

body.vjs-home-terms-locked .cookie-consent {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Componentes compartilhados devem herdar a paleta ativa. */
body.vjs-theme-light .home-terms-modal__content a,
body.vjs-theme-light .vjs-cms-public-content-card a,
body.vjs-theme-light .vjs-cms-public-kicker,
body.vjs-theme-light .vjs-cms-managed-content-icon,
body.vjs-theme-light .vjs-assistant-shortcut-icon,
body.vjs-theme-light .vjs-message-category,
body.vjs-theme-light .vjs-message-unread-dot,
body.vjs-theme-light .vjs-knowledge-chat-participant-context-menu button,
body.vjs-theme-light .vjs-knowledge-chat-room .vjs-knowledge-chat-message .vjs-knowledge-chat-avatar,
body.vjs-theme-light .vjs-knowledge-chat-author-icon {
    color: var(--brand) !important;
}

body.vjs-theme-light .home-terms-modal__button--accept,
body.vjs-theme-light .home-terms-modal__button--accept:hover,
body.vjs-theme-light .home-terms-modal__button--accept:focus-visible,
body.vjs-theme-light .vjs-assistant-form button,
body.vjs-theme-light .vjs-assistant-form button:hover,
body.vjs-theme-light .vjs-assistant-form button:focus-visible {
    border-color: var(--brand) !important;
    background: var(--brand) !important;
    color: #fff !important;
    box-shadow: 0 12px 26px rgba(var(--vjs-primary-rgb), .24) !important;
}

body.vjs-theme-light .home-terms-modal__content a:focus-visible,
body.vjs-theme-light .vjs-cms-public-content-card a:focus-visible {
    outline: 3px solid rgba(var(--vjs-primary-rgb), .25) !important;
    outline-offset: 3px;
}

body.vjs-theme-light .vjs-assistant-shortcut-icon,
body.vjs-theme-light .vjs-knowledge-chat-author-icon {
    border-color: rgba(var(--vjs-primary-rgb), .22) !important;
}

body.vjs-theme-light .vjs-assistant-form input:focus {
    border-color: var(--brand) !important;
    box-shadow: 0 0 0 4px rgba(var(--vjs-primary-rgb), .14) !important;
}

body.vjs-theme-light .vjs-message-category,
body.vjs-theme-light .vjs-message-unread-dot {
    border-color: rgba(var(--vjs-primary-rgb), .18) !important;
    background: var(--brand-soft) !important;
}

body.vjs-theme-light .vjs-message-center-metric.is-unread,
body.vjs-theme-light .vjs-message-card.is-unread {
    border-color: rgba(var(--vjs-primary-rgb), .27) !important;
    background: linear-gradient(180deg, #fff, var(--brand-soft)) !important;
}

body.vjs-theme-light .vjs-cms-public-kicker {
    border-color: rgba(var(--vjs-primary-rgb), .18) !important;
    background: rgba(var(--vjs-primary-rgb), .10) !important;
}

body.vjs-theme-light .vjs-cms-managed-content-card:hover {
    border-color: rgba(var(--vjs-primary-rgb), .30) !important;
}

body.vjs-theme-light .vjs-created-order-icon {
    background: linear-gradient(135deg, var(--brand), var(--vjs-seasonal-secondary, var(--brand-2))) !important;
    box-shadow: 0 18px 44px rgba(var(--vjs-primary-rgb), .24), inset 0 1px 0 rgba(255,255,255,.26) !important;
}

/* A preferência do usuário e a qualidade reduzida do motor sempre vencem o
 * CSS específico do tema, inclusive as regras finais do Natal. */
body.vjs-theme-effects-reduced [data-vjs-seasonal-theme-root] *,
body.vjs-theme-effects-reduced [data-vjs-theme-generated] {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
}

body.vjs-theme-effects-reduced :is(
    .vjs-christmas-snow,
    .vjs-world-cup-confetti,
    .vjs-site-anniversary-confetti,
    .vjs-site-anniversary-balloons,
    .vjs-mothers-day-heart-rain,
    .vjs-new-year-fireworks,
    .vjs-seasonal-scene__particles
) {
    display: none !important;
}

@media (prefers-reduced-motion: reduce) {
    body.vjs-theme-seasonal [data-vjs-seasonal-theme-root] *,
    body.vjs-theme-seasonal [data-vjs-theme-generated] {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }

    body.vjs-theme-seasonal :is(
        .vjs-christmas-snow,
        .vjs-world-cup-confetti,
        .vjs-site-anniversary-confetti,
        .vjs-site-anniversary-balloons,
        .vjs-mothers-day-heart-rain,
        .vjs-new-year-fireworks,
        .vjs-seasonal-scene__particles
    ) {
        display: none !important;
    }
}
