/* ============================================================
   COOKIE BANNER + CONSENT MODE
   ============================================================ */

/* ==== Overlay escuro (só aparece quando o config está aberto) ==== */
.cookie-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s, visibility .3s;
}
.cookie-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

/* ==== Banner (barra inferior) ==== */
.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    background: #0a0a0a;
    border-top: 1px solid #1f1f1f;
    box-shadow: 0 -20px 60px rgba(0, 0, 0, .5);
    padding: 24px 0;
    transform: translateY(100%);
    transition: transform .4s cubic-bezier(.22, 1, .36, 1);
    font-family: 'Rubik', system-ui, sans-serif;
}
.cookie-banner.is-visible {
    transform: translateY(0);
}

.cookie-banner-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 32px;
    align-items: center;
}

/* ==== Texto ==== */
.cookie-text {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}
.cookie-icon {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 50%;
    background: rgba(235, 90, 62, .12);
    color: #eb5a3e;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}
.cookie-title {
    font-family: 'Oswald', sans-serif;
    font-size: 1.1rem;
    font-weight: 500;
    color: #fff;
    margin: 0 0 6px;
    text-transform: uppercase;
    letter-spacing: .02em;
    line-height: 1.2;
}
.cookie-desc {
    font-size: 13.5px;
    color: #a3a3a3;
    line-height: 1.6;
    margin: 0;
    max-width: 680px;
}
.cookie-desc a {
    color: #eb5a3e;
    text-decoration: none;
    border-bottom: 1px solid rgba(235, 90, 62, .3);
}
.cookie-desc a:hover {
    border-bottom-color: #eb5a3e;
}

/* ==== Botões ==== */
.cookie-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.cookie-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .02em;
    border-radius: 8px;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
    text-decoration: none;
}
.cookie-btn-primary {
    background: #eb5a3e;
    color: #fff;
    border-color: #eb5a3e;
}
.cookie-btn-primary:hover {
    background: #af3119;
    border-color: #af3119;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(235, 90, 62, .3);
}
.cookie-btn-outline {
    background: transparent;
    color: #c7c7c7;
    border-color: #2a2a2a;
}
.cookie-btn-outline:hover {
    border-color: #c7c7c7;
    color: #fff;
}
.cookie-btn-ghost {
    background: transparent;
    color: #969696;
    border-color: transparent;
    padding: 12px 16px;
}
.cookie-btn-ghost:hover {
    color: #fff;
}

/* ==== Painel de configuração ==== */
.cookie-config {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(.95);
    z-index: 99999;
    background: #111;
    border: 1px solid #1f1f1f;
    border-radius: 16px;
    width: 90%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, .7);
    opacity: 0;
    visibility: hidden;
    transition: all .3s cubic-bezier(.22, 1, .36, 1);
    font-family: 'Rubik', system-ui, sans-serif;
}
.cookie-config.is-open {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.cookie-config-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #1f1f1f;
}
.cookie-config-head h3 {
    font-family: 'Oswald', sans-serif;
    font-size: 1.4rem;
    color: #fff;
    margin: 0 0 6px;
    text-transform: uppercase;
    letter-spacing: .02em;
    font-weight: 500;
}
.cookie-config-head p {
    font-size: 13.5px;
    color: #969696;
    margin: 0;
    line-height: 1.6;
}
.cookie-config-close {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 8px;
    background: transparent;
    border: 1px solid #2a2a2a;
    color: #969696;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all .2s;
}
.cookie-config-close:hover {
    background: rgba(239, 68, 68, .1);
    border-color: rgba(239, 68, 68, .3);
    color: #f87171;
}

/* ==== Itens de configuração ==== */
.cookie-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid #1a1a1a;
}
.cookie-item:last-of-type {
    border-bottom: none;
}
.cookie-item-info h4 {
    font-size: 14.5px;
    color: #fff;
    margin: 0 0 6px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}
.cookie-item-badge {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 50px;
    background: rgba(34, 197, 94, .15);
    color: #4ade80;
}
.cookie-item-info p {
    font-size: 13px;
    color: #969696;
    margin: 0;
    line-height: 1.6;
    max-width: 380px;
}

/* ==== Toggle switch ==== */
.cookie-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
    flex-shrink: 0;
    margin-top: 4px;
}
.cookie-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.cookie-switch-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #2a2a2a;
    border-radius: 50px;
    transition: .3s;
}
.cookie-switch-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background: #969696;
    border-radius: 50%;
    transition: .3s;
}
.cookie-switch input:checked + .cookie-switch-slider {
    background: #eb5a3e;
}
.cookie-switch input:checked + .cookie-switch-slider::before {
    transform: translateX(20px);
    background: #fff;
}
.cookie-switch input:disabled + .cookie-switch-slider {
    opacity: .6;
    cursor: not-allowed;
}

/* ==== Footer do config ==== */
.cookie-config-actions {
    display: flex;
    gap: 10px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #1f1f1f;
}
.cookie-config-actions .cookie-btn {
    flex: 1;
    justify-content: center;
}

/* ==== Responsivo ==== */
@media (max-width: 860px) {
    .cookie-banner-inner {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .cookie-actions {
        justify-content: stretch;
    }
    .cookie-actions .cookie-btn {
        flex: 1;
        justify-content: center;
    }
}

@media (max-width: 560px) {
    .cookie-banner {
        padding: 20px 0;
    }
    .cookie-banner-inner {
        padding: 0 18px;
    }
    .cookie-text {
        gap: 12px;
    }
    .cookie-icon {
        width: 36px;
        height: 36px;
        font-size: 15px;
    }
    .cookie-title {
        font-size: 1rem;
    }
    .cookie-desc {
        font-size: 13px;
    }
    .cookie-actions {
        flex-direction: column;
        gap: 8px;
    }
    .cookie-actions .cookie-btn {
        width: 100%;
    }

    .cookie-config {
        padding: 24px 20px;
        max-height: 92vh;
    }
    .cookie-config-head h3 {
        font-size: 1.2rem;
    }
    .cookie-item {
        padding: 16px 0;
    }
    .cookie-config-actions {
        flex-direction: column;
    }
}