/* ─────────────────────────────────────────────────────────
   cookie-consent.css — Banner e Modal de Consentimento
   Cellebra Festas — versão 1.0
   ───────────────────────────────────────────────────────── */

/* ── Banner ────────────────────────────────────────────── */
body:not(.body-password) .notification.notification-fixed-bottom.notification-primary,
body:not(.body-password).js-notification-cookie-banner.notification.notification-fixed-bottom.notification-primary {
    background: #1a1a2e;
    color: #fff;
    padding: 12px;
    box-shadow: 0 -4px 24px rgba(0,0,0,.3);
}

body:not(.body-password) .notification.notification-fixed-bottom.notification-primary .container,
body:not(.body-password) .notification.notification-fixed-bottom.notification-primary .container-fluid {
    max-width: 1100px;
    margin: 0 auto;
}

body:not(.body-password) .notification.notification-fixed-bottom.notification-primary .row {
    align-items: center;
    justify-content: center;
}

body:not(.body-password) .notification.notification-fixed-bottom.notification-primary .btn-link {
    color: #E02078;
    font-weight: 700;
}

body:not(.body-password) .js-notification-cookie-banner {
    background: #1a1a2e;
    color: #fff;
    box-shadow: 0 -4px 24px rgba(0,0,0,.3);
    padding: 12px;
    text-align: left;
}

body:not(.body-password) .js-notification-cookie-banner .container-fluid,
body:not(.body-password) .js-notification-cookie-banner .container {
    max-width: 1100px;
    margin: 0 auto;
}

body:not(.body-password) .js-notification-cookie-banner .row {
    align-items: center;
    justify-content: center;
}

body:not(.body-password) .js-notification-cookie-banner .btn-link {
    color: #E02078;
    font-weight: 700;
}

.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1a1a2e;
    color: #fff;
    z-index: 9900;
    padding: 18px 24px;
    box-shadow: 0 -4px 24px rgba(0,0,0,.3);
    opacity: 0;
    transform: translateY(100%);
    transition: opacity .35s ease, transform .35s ease;
}

.cookie-consent-banner.cookie-banner--visible {
    opacity: 1;
    transform: translateY(0);
}

.cookie-consent-banner.cookie-banner--hiding {
    opacity: 0;
    transform: translateY(100%);
}

.cookie-banner-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.cookie-banner-text {
    flex: 1;
    min-width: 260px;
}

.cookie-banner-text strong {
    font-size: .95rem;
    display: block;
    margin-bottom: 4px;
}

.cookie-banner-text p {
    font-size: .82rem;
    color: rgba(255,255,255,.75);
    margin: 0;
    line-height: 1.5;
}

.cookie-banner-text a {
    color: #E02078;
    text-decoration: underline;
}

/* ── Ações ─────────────────────────────────────────────── */
.cookie-banner-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.cookie-btn {
    border: none;
    border-radius: 6px;
    padding: 9px 18px;
    font-size: .83rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, transform .1s;
    white-space: nowrap;
}

.cookie-btn--primary {
    background: linear-gradient(90deg, #D9026D 0%, #E02078 100%);
    color: #fff;
}

.cookie-btn--primary:hover {
    background: linear-gradient(90deg, #B6025B 0%, #E02078 100%);
    transform: translateY(-1px);
}

.cookie-btn--outline {
    background: transparent;
    color: #fff;
    border: 1.5px solid rgba(255,255,255,.4);
}

.cookie-btn--outline:hover {
    background: rgba(255,255,255,.08);
}

.cookie-btn--ghost {
    background: transparent;
    color: rgba(255,255,255,.65);
    text-decoration: underline;
    padding: 9px 10px;
}

.cookie-btn--ghost:hover {
    color: #fff;
}

/* ── Modal de configurações ────────────────────────────── */
.cookie-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 9999;
    display: flex;
    align-items: flex-start;            /* alinhar ao topo para não cortar no rodapé */
    justify-content: center;
    padding: 40px 20px 80px;            /* respiro extra embaixo */
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s;
    overflow-y: auto;                   /* permitir scroll do overlay se precisar */
}

.cookie-modal.cookie-modal--open {
    opacity: 1;
    pointer-events: all;
}

.cookie-modal-box {
    background: #fff;
    border-radius: 14px;
    width: 100%;
    max-width: 520px;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    overflow: hidden;
    transform: scale(.95);
    transition: transform .25s;
    margin: auto;                       /* centraliza verticalmente quando cabe */
    max-height: calc(100vh - 120px);    /* não estoura a viewport */
    display: flex;
    flex-direction: column;
}

.cookie-modal--open .cookie-modal-box { transform: scale(1); }

.cookie-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 16px;
    border-bottom: 1px solid #eee;
}

.cookie-modal-header h3 {
    font-size: 1.05rem;
    color: #D9026D;
    margin: 0;
}

.cookie-modal-close {
    background: transparent;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    color: #888;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, color .2s;
}

.cookie-modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.cookie-modal-body {
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: calc(100vh - 240px);    /* reserva espaço para header+footer */
    overflow-y: auto;
    flex: 1 1 auto;
}

.cookie-toggle-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.cookie-toggle-item:last-child { border-bottom: none; padding-bottom: 0; }

.cookie-toggle-info strong {
    display: block;
    font-size: .88rem;
    color: #1a1a2e;
    margin-bottom: 3px;
}

.cookie-toggle-info p {
    font-size: .78rem;
    color: #777;
    margin: 0;
    line-height: 1.5;
}

/* Toggle switch */
.cookie-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
    cursor: pointer;
}

.cookie-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-switch-slider {
    position: absolute;
    inset: 0;
    background: #ccc;
    border-radius: 24px;
    transition: background .25s;
}

.cookie-switch-slider::before {
    content: '';
    position: absolute;
    left: 3px;
    top: 3px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: transform .25s;
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
}

.cookie-switch input:checked + .cookie-switch-slider { background: #D9026D; }
.cookie-switch input:checked + .cookie-switch-slider::before { transform: translateX(20px); }
.cookie-switch input:disabled + .cookie-switch-slider { background: #E0A3C1; cursor: not-allowed; opacity: .7; }

.cookie-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
}

/* ── Responsivo ────────────────────────────────────────── */
@media (max-width: 640px) {
    .cookie-banner-content {
        flex-direction: column;
        gap: 14px;
    }

    .cookie-banner-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .cookie-btn--ghost { order: -1; }
}
