/* ==================== COOKIE BANNER ==================== */
.cookie-banner {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    z-index: 99999;
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-top: 1px solid var(--glass-border);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.3);
    transition: bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 24px;
}

.cookie-banner.show {
    bottom: 0;
}

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

.cookie-icon {
    font-size: 3rem;
    animation: bounce 2s ease-in-out infinite;
}

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

.cookie-text h3 {
    margin: 0 0 8px 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
}

.cookie-text p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

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

.cookie-btn {
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
    white-space: nowrap;
}

/* ==================== COOKIE SETTINGS MODAL ==================== */
.cookie-settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

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

.cookie-settings-modal .modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.cookie-settings-modal .modal-container {
    position: relative;
    background: var(--bg-secondary);
    border-radius: 24px;
    max-width: 700px;
    width: 90%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--glass-border);
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.cookie-settings-modal .modal-header {
    padding: 24px 32px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.cookie-settings-modal .modal-header h2 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text);
}

.cookie-settings-modal .modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.cookie-settings-modal .modal-close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.cookie-settings-modal .modal-body {
    padding: 32px;
    overflow-y: auto;
    flex: 1;
}

.settings-intro {
    margin: 0 0 24px 0;
    padding: 16px;
    background: rgba(99, 102, 241, 0.1);
    border-left: 4px solid var(--primary);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.cookie-categories {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cookie-category {
    background: var(--bg-tertiary);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 20px;
    transition: all 0.3s ease;
}

.cookie-category:hover {
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.category-info {
    flex: 1;
}

.category-info h4 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}

.category-info p {
    margin: 0 0 8px 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.category-examples {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Cookie Toggle Switch */
.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 56px;
    height: 30px;
    flex-shrink: 0;
}

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

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-tertiary);
    transition: 0.3s;
    border-radius: 30px;
    border: 2px solid var(--glass-border);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.cookie-toggle input:checked + .toggle-slider {
    background-color: var(--primary);
    border-color: var(--primary);
}

.cookie-toggle input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

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

.cookie-toggle input:disabled:checked + .toggle-slider {
    background-color: var(--success);
    border-color: var(--success);
}

.cookie-settings-modal .modal-footer {
    padding: 20px 32px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-shrink: 0;
}

.cookie-settings-modal .modal-footer button {
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .cookie-banner-content {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .cookie-icon {
        font-size: 2.5rem;
    }

    .cookie-text {
        min-width: auto;
    }

    .cookie-actions {
        width: 100%;
        flex-direction: column;
    }

    .cookie-btn {
        width: 100%;
    }

    .cookie-settings-modal .modal-container {
        width: 95%;
        max-height: 90vh;
    }

    .cookie-settings-modal .modal-header {
        padding: 20px;
    }

    .cookie-settings-modal .modal-body {
        padding: 20px;
    }

    .cookie-settings-modal .modal-footer {
        padding: 16px 20px;
        flex-direction: column;
    }

    .cookie-settings-modal .modal-footer button {
        width: 100%;
    }

    .category-header {
        flex-direction: column;
        gap: 12px;
    }

    .cookie-toggle {
        align-self: flex-start;
    }
}

/* ==================== LIGHT MODE ==================== */
[data-theme="light"] .cookie-banner {
    background: rgba(255, 255, 255, 0.95);
    border-top-color: rgba(148, 163, 184, 0.2);
}

[data-theme="light"] .cookie-settings-modal .modal-container {
    background: #ffffff;
}

[data-theme="light"] .cookie-category {
    background: #f8fafc;
    border-color: rgba(148, 163, 184, 0.2);
}

[data-theme="light"] .toggle-slider {
    background-color: #e2e8f0;
    border-color: #cbd5e1;
}

[data-theme="light"] .toggle-slider:before {
    background-color: white;
}
