/* ================================================
   COOKIE CONSENT BANNER - TomaRock
   LGPD Compliant: Aceitar / Rejeitar / Configurar
   ================================================ */

/* ── Banner principal ── */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    background: rgba(10, 10, 10, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(176, 38, 255, 0.3);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 -4px 40px rgba(176, 38, 255, 0.15);
}

#cookie-banner.visible {
    transform: translateY(0);
}

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

.cookie-banner-text p {
    margin: 0;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.75);
    line-height: 1.6;
    font-family: 'Outfit', sans-serif;
}

.cookie-banner-text a {
    color: #B026FF;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s;
}

.cookie-banner-text a:hover {
    color: #00F0FF;
}

.cookie-banner-title {
    font-size: 0.88rem !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    margin-bottom: 4px !important;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ── Botões do banner ── */
.cookie-banner-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 9px 20px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    border: none;
    transition: all 0.25s ease;
    white-space: nowrap;
    letter-spacing: 0.3px;
}

.cookie-btn-accept {
    background: linear-gradient(135deg, #B026FF, #7b00cc);
    color: #fff;
    box-shadow: 0 2px 12px rgba(176, 38, 255, 0.4);
}

.cookie-btn-accept:hover {
    background: linear-gradient(135deg, #c940ff, #9500ff);
    transform: translateY(-1px);
    box-shadow: 0 4px 18px rgba(176, 38, 255, 0.55);
}

.cookie-btn-reject {
    background: transparent;
    color: rgba(255,255,255,0.6);
    border: 1px solid rgba(255,255,255,0.15);
}

.cookie-btn-reject:hover {
    background: rgba(255,255,255,0.06);
    color: #fff;
    border-color: rgba(255,255,255,0.3);
}

.cookie-btn-configure {
    background: transparent;
    color: #00F0FF;
    border: 1px solid rgba(0, 240, 255, 0.3);
}

.cookie-btn-configure:hover {
    background: rgba(0, 240, 255, 0.08);
    border-color: #00F0FF;
}

/* ── Modal de configurações ── */
#cookie-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#cookie-modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.cookie-modal {
    background: #111111;
    border: 1px solid rgba(176, 38, 255, 0.25);
    border-radius: 16px;
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 40px rgba(176, 38, 255, 0.1);
}

#cookie-modal-overlay.active .cookie-modal {
    transform: translateY(0);
}

.cookie-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.cookie-modal-close:hover {
    background: rgba(176, 38, 255, 0.15);
    color: #fff;
    border-color: rgba(176, 38, 255, 0.4);
}

.cookie-modal h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 6px;
    font-family: 'Outfit', sans-serif;
}

.cookie-modal > p {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.55);
    margin: 0 0 24px;
    line-height: 1.6;
    font-family: 'Outfit', sans-serif;
}

/* ── Categorias de cookies ── */
.cookie-category {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 12px;
    transition: border-color 0.2s;
}

.cookie-category:hover {
    border-color: rgba(176, 38, 255, 0.2);
}

.cookie-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
    gap: 12px;
}

.cookie-category-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
    font-family: 'Outfit', sans-serif;
}

.cookie-category-desc {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.5);
    line-height: 1.5;
    font-family: 'Outfit', sans-serif;
    margin: 0;
}

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

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.cookie-toggle-slider {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.1);
    border-radius: 24px;
    cursor: pointer;
    transition: background 0.3s;
    border: 1px solid rgba(255,255,255,0.15);
}

.cookie-toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 2px;
    top: 2px;
    background: rgba(255,255,255,0.5);
    border-radius: 50%;
    transition: transform 0.3s, background 0.3s;
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    background: linear-gradient(135deg, #B026FF, #7b00cc);
    border-color: rgba(176, 38, 255, 0.5);
}

.cookie-toggle input:checked + .cookie-toggle-slider::before {
    transform: translateX(20px);
    background: #fff;
}

.cookie-toggle input:disabled + .cookie-toggle-slider {
    opacity: 0.6;
    cursor: not-allowed;
}

.cookie-always-on {
    font-size: 0.72rem;
    color: #00F0FF;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    flex-shrink: 0;
}

/* ── Botões do modal ── */
.cookie-modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.cookie-modal-actions .cookie-btn {
    flex: 1;
    min-width: 120px;
    text-align: center;
}

/* ── Responsivo ── */
@media (max-width: 640px) {
    #cookie-banner {
        padding: 16px;
        flex-direction: column;
        align-items: flex-start;
    }

    .cookie-banner-actions {
        width: 100%;
    }

    .cookie-btn {
        flex: 1;
        text-align: center;
        padding: 10px 12px;
    }

    .cookie-modal {
        padding: 24px 20px;
    }

    .cookie-modal-actions {
        flex-direction: column;
    }

    .cookie-modal-actions .cookie-btn {
        text-align: center;
    }
}
