/* =========================================================
   CONSULT SAFE-BR — cookies.css
   Banner de consentimento e modal de preferências de cookies.
   ========================================================= */

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    background: var(--azul-marinho);
    color: #fff;
    box-shadow: 0 -8px 30px rgba(6, 26, 69, 0.25);
    pointer-events: auto;
}
.cookie-banner[hidden] { display: none; }

.cookie-banner-inner {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 20px 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}
.cookie-banner-text {
    flex: 1 1 420px;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}
.cookie-banner-text a { color: #fff; text-decoration: underline; }
.cookie-banner-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    flex-shrink: 0;
}
.cookie-banner .btn-outline-dark {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
}
.cookie-banner .btn-outline-dark:hover { background: rgba(255, 255, 255, 0.12); border-color: #fff; }

/* ---------- Modal de preferências ---------- */
.cookie-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2100;
    background: rgba(6, 26, 69, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.cookie-modal-overlay[hidden] { display: none; }

.cookie-modal {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 560px;
    width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    position: relative;
}
.cookie-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 28px 12px;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 2;
}
.cookie-modal-header h2 { font-size: 1.2rem; margin: 0; }
.cookie-modal-close {
    background: var(--cinza-claro);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.3rem;
    line-height: 1;
    color: var(--preto-azulado);
    flex-shrink: 0;
    transition: background var(--transition);
}
.cookie-modal-close:hover { background: #e4e8ee; }

.cookie-modal-body { padding: 4px 28px 8px; }
.cookie-modal-body > p { font-size: 0.92rem; margin-bottom: 18px; }

.cookie-category {
    border: 1px solid rgba(6, 26, 69, 0.1);
    border-radius: var(--radius-sm);
    padding: 16px 18px;
    margin-bottom: 14px;
}
.cookie-category-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}
.cookie-category-head label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--preto-azulado);
}
.cookie-category-head input[type="checkbox"] { width: 18px; height: 18px; }
.cookie-category-tag {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--azul-institucional);
    background: rgba(0, 87, 217, 0.1);
    padding: 4px 10px;
    border-radius: 100px;
}
.cookie-category p { font-size: 0.86rem; margin: 0; color: var(--cinza-texto); }

.cookie-modal-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
    padding: 16px 28px 26px;
    position: sticky;
    bottom: 0;
    background: #fff;
}

@media (max-width: 640px) {
    .cookie-banner-inner { flex-direction: column; align-items: stretch; text-align: left; }
    .cookie-banner-actions { flex-direction: column; }
    .cookie-banner-actions .btn { width: 100%; }
    .cookie-modal-footer { flex-direction: column-reverse; }
    .cookie-modal-footer .btn { width: 100%; }
}
