/* Cookie consent bar and preferences modal
-------------------------------------------------- */
#cookie-consent-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10050;
    background: #002E6C;
    color: #fff;
    padding: 1rem 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
    visibility: hidden;
}

#cookie-consent-bar.show {
    transform: translateY(0);
    visibility: visible;
}

#cookie-consent-bar .cookie-consent-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0;
}

#cookie-consent-bar .cookie-consent-text a {
    color: #fff;
    text-decoration: underline;
}

#cookie-consent-bar .cookie-consent-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

#cookie-consent-modal {
    position: fixed;
    inset: 0;
    z-index: 10060;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease-out, visibility 0.2s ease-out;
}

#cookie-consent-modal.show {
    opacity: 1;
    visibility: visible;
}

#cookie-consent-modal .cookie-consent-modal-content {
    background: #fff;
    border-radius: 8px;
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

#cookie-consent-modal .cookie-consent-category {
    border-bottom: 1px solid #eee;
    padding: 1rem 0;
}

#cookie-consent-modal .cookie-consent-category:last-of-type {
    border-bottom: none;
}

#cookie-consent-modal .cookie-consent-category-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

#cookie-consent-modal .cookie-consent-category-title {
    font-weight: 600;
    color: #002E6C;
    margin-bottom: 0.25rem;
}

#cookie-consent-modal .cookie-consent-category-desc {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0;
}

#cookie-consent-modal .form-check-input:checked {
    background-color: #0047A8;
    border-color: #0047A8;
}

/* Espaço no rodapé para o banner fixo (fundo escuro, sem faixa branca no .body) */
body.cookie-consent-visible #footer .footer-copyright,
body.cookie-consent-visible #footer.h-50px {
    padding-bottom: var(--cookie-consent-bar-height, 5.5rem);
}

@media (max-width: 575.98px) {
    #cookie-consent-bar .cookie-consent-actions {
        justify-content: stretch;
    }

    #cookie-consent-bar .cookie-consent-actions .btn {
        flex: 1 1 auto;
    }
}
