/* =====================================================
   COOKIE BANNER / MODAL
   Segue o design system da Vênia (cores, tipografia, raio)
   ===================================================== */

.cookie-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 1200;
    max-width: 1140px;
    margin: 0 auto;
    padding: 20px 24px;
    background: #ffffff;
    border: 1px solid rgba(14, 17, 23, 0.10);
    border-radius: 24px;
    box-shadow: 0 24px 54px rgba(14, 17, 23, 0.16);
    animation: cookieSlideIn 0.4s ease both;
}

@keyframes cookieSlideIn {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

.cookie-banner-hidden {
    animation: cookieSlideOut 0.3s ease forwards;
}

@keyframes cookieSlideOut {
    to { opacity: 0; transform: translateY(24px); }
}

.cookie-banner-inner {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

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

.cookie-banner-content h3 {
    font-family: "Belgiano", serif;
    font-weight: 400;
    font-size: 1.35rem;
    color: #0e1117;
    margin: 0 0 6px;
    letter-spacing: 0.01em;
}

.cookie-banner-content p {
    font-family: "Montserrat", sans-serif;
    font-size: 0.92rem;
    line-height: 1.55;
    color: #4f5562;
    margin: 0;
}

.cookie-preferences-link {
    color: #b7894b;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
    white-space: nowrap;
}

.cookie-preferences-link:hover {
    color: #d4aa70;
}

.cookie-banner-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cookie-btn {
    font-family: "Montserrat", sans-serif;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: transparent;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    white-space: nowrap;
}

.cookie-btn-primary {
    background: #d4aa70;
    color: #0e1117;
    box-shadow: 0 8px 18px rgba(212, 170, 112, 0.28);
}

.cookie-btn-primary:hover {
    background: #b7894b;
    transform: translateY(-1px);
}

.cookie-btn-ghost {
    background: #ffffff;
    color: #0e1117;
    border-color: rgba(14, 17, 23, 0.14);
}

.cookie-btn-ghost:hover {
    border-color: rgba(14, 17, 23, 0.35);
    transform: translateY(-1px);
}

/* ==== MODAL ==== */
.cookie-modal {
    position: fixed;
    inset: 0;
    z-index: 1300;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cookie-modal.is-open {
    display: flex;
    animation: cookieFadeIn 0.25s ease both;
}

@keyframes cookieFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.cookie-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(14, 17, 23, 0.48);
    backdrop-filter: blur(4px);
}

.cookie-modal-card {
    position: relative;
    width: 100%;
    max-width: 520px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 32px;
    background: #ffffff;
    border: 1px solid rgba(14, 17, 23, 0.08);
    border-radius: 28px;
    box-shadow: 0 32px 72px rgba(14, 17, 23, 0.22);
}

.cookie-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(14, 17, 23, 0.12);
    background: #ffffff;
    color: #0e1117;
    font-size: 1.1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.cookie-modal-close:hover {
    background: #f4f1ea;
}

.cookie-modal-card h3 {
    font-family: "Belgiano", serif;
    font-weight: 400;
    font-size: 1.9rem;
    color: #0e1117;
    margin: 0 0 10px;
    letter-spacing: 0.01em;
}

.cookie-modal-intro {
    font-family: "Montserrat", sans-serif;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #4f5562;
    margin: 0 0 24px;
}

.cookie-option {
    padding: 16px 18px;
    border: 1px solid rgba(14, 17, 23, 0.08);
    border-radius: 18px;
    background: #fbf8f2;
    margin-bottom: 12px;
}

.cookie-option-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.cookie-option-title {
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    color: #0e1117;
    font-size: 0.98rem;
}

.cookie-option-locked {
    font-size: 0.78rem;
    font-weight: 700;
    color: #b7894b;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.cookie-option p {
    font-family: "Montserrat", sans-serif;
    font-size: 0.88rem;
    line-height: 1.5;
    color: #4f5562;
    margin: 0;
}

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

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

.cookie-switch span {
    position: absolute;
    inset: 0;
    background: rgba(14, 17, 23, 0.16);
    border-radius: 999px;
    transition: background 0.25s ease;
}

.cookie-switch span::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #ffffff;
    border-radius: 50%;
    transition: transform 0.25s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

.cookie-switch input:checked + span {
    background: #d4aa70;
}

.cookie-switch input:checked + span::before {
    transform: translateX(20px);
}

.cookie-modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.cookie-modal-actions .cookie-btn {
    flex: 1;
    min-width: 140px;
}

@media (max-width: 640px) {
    .cookie-banner {
        padding: 18px;
        border-radius: 20px;
    }
    .cookie-banner-inner {
        gap: 14px;
    }
    .cookie-banner-actions {
        width: 100%;
    }
    .cookie-banner-actions .cookie-btn {
        flex: 1;
    }
    .cookie-modal-card {
        padding: 24px 20px;
        border-radius: 22px;
    }
    .cookie-modal-card h3 {
        font-size: 1.6rem;
    }
}
