/**
 * Cookie Consent Modal - Aurora Brand
 * GDPR/LGPD Compliant Cookie Banner
 */

/* ===== Cookie Consent Container ===== */
.cookie-consent-wrapper {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    pointer-events: none;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-consent-wrapper.hidden {
    transform: translateY(100%);
}

.cookie-consent-wrapper.visible {
    transform: translateY(0);
    pointer-events: all;
}

/* ===== Cookie Banner ===== */
.cookie-consent {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.98));
    backdrop-filter: blur(20px);
    border-top: 2px solid rgba(99, 102, 241, 0.3);
    padding: var(--space-6) var(--space-8);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
}

.cookie-consent-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: var(--space-6);
}

/* ===== Cookie Icon ===== */
.cookie-icon {
    font-size: 3rem;
    flex-shrink: 0;
    animation: cookieBounce 2s ease-in-out infinite;
}

@keyframes cookieBounce {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-5px) rotate(5deg);
    }
}

/* ===== Cookie Text ===== */
.cookie-text {
    flex: 1;
}

.cookie-title {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    color: white;
    margin-bottom: var(--space-2);
}

.cookie-description {
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
}

.cookie-description a {
    color: var(--aurora-primary);
    text-decoration: underline;
    transition: color 0.2s ease;
}

.cookie-description a:hover {
    color: var(--aurora-accent);
}

/* ===== Cookie Actions ===== */
.cookie-actions {
    display: flex;
    gap: var(--space-4);
    flex-shrink: 0;
}

.cookie-btn {
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-lg);
    font-weight: var(--font-semibold);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: var(--text-base);
}

.cookie-btn-accept {
    background: linear-gradient(135deg, var(--aurora-primary), var(--aurora-accent));
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.cookie-btn-accept:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.6);
}

.cookie-btn-manage {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.cookie-btn-manage:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

/* ===== Cookie Preferences Modal ===== */
.cookie-preferences-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

.cookie-preferences-modal.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.cookie-preferences-content {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border-radius: var(--radius-2xl);
    border: 2px solid rgba(99, 102, 241, 0.3);
    padding: var(--space-10);
    max-width: 700px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.7);
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-preferences-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-6);
}

.cookie-preferences-title {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    color: white;
}

.cookie-close-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--text-3xl);
    cursor: pointer;
    transition: color 0.2s ease;
    line-height: 1;
    padding: 0;
}

.cookie-close-btn:hover {
    color: white;
}

/* ===== Cookie Categories ===== */
.cookie-category {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    margin-bottom: var(--space-4);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-3);
}

.cookie-category-title {
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    color: white;
}

.cookie-category-description {
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

/* ===== Cookie Toggle Switch ===== */
.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 56px;
    height: 28px;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.2);
    transition: 0.4s;
    border-radius: 34px;
}

.cookie-toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

.cookie-toggle input:checked+.cookie-toggle-slider {
    background: linear-gradient(135deg, var(--aurora-primary), var(--aurora-accent));
}

.cookie-toggle input:checked+.cookie-toggle-slider:before {
    transform: translateX(28px);
}

.cookie-toggle input:disabled+.cookie-toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== Preferences Footer ===== */
.cookie-preferences-footer {
    display: flex;
    gap: var(--space-4);
    margin-top: var(--space-8);
    padding-top: var(--space-6);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.cookie-preferences-footer .cookie-btn {
    flex: 1;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .cookie-consent-content {
        flex-direction: column;
        text-align: center;
    }

    .cookie-actions {
        width: 100%;
        flex-direction: column;
    }

    .cookie-btn {
        width: 100%;
    }

    .cookie-preferences-content {
        padding: var(--space-6);
        width: 95%;
    }
}