/* ============================================
   COOKIE BANNER & MODAL
   ============================================ */

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    padding: 2rem;
    z-index: 10000;
    animation: slideUp 0.4s ease-out;
}

[data-theme="light"] .cookie-banner {
    background: rgba(255, 255, 255, 0.98);
}

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

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.cookie-banner-text {
    flex: 1;
}

.cookie-banner-text h3 {
    font-size: var(--step-1);
    margin-bottom: 0.5rem;
    color: var(--fg);
}

.cookie-banner-text p {
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 0.5rem;
    font-size: var(--step--1);
}

.cookie-links {
    margin-top: 0.5rem;
}

.cookie-links a {
    color: var(--primary);
    text-decoration: none;
    font-size: var(--step--1);
}

.cookie-links a:hover {
    text-decoration: underline;
}

.cookie-banner-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-text {
    background: transparent;
    border: none;
    color: var(--muted);
    padding: 0.75rem 1rem;
    font-size: var(--step--1);
    cursor: pointer;
    transition: color 0.2s ease;
}

.btn-text:hover {
    color: var(--fg);
}

/* Cookie Modal */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

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

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

.cookie-modal-content {
    position: relative;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    max-width: 700px;
    width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2rem;
    border-bottom: 1px solid var(--border);
}

.cookie-modal-header h3 {
    font-size: var(--step-2);
    color: var(--fg);
    margin: 0;
}

.cookie-modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--muted);
    cursor: pointer;
    transition: color 0.2s ease;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
}

.cookie-modal-close:hover {
    color: var(--fg);
}

.cookie-modal-body {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
}

.cookie-category {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.cookie-category-header {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.cookie-category-header h4 {
    font-size: var(--step-0);
    color: var(--fg);
    margin-bottom: 0.5rem;
}

.cookie-category-header p {
    color: var(--muted);
    font-size: var(--step--1);
    line-height: 1.6;
}

.cookie-category-details {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.cookie-category-details ul {
    list-style: disc;
    margin-left: 1.5rem;
}

.cookie-category-details li {
    color: var(--muted);
    font-size: var(--step--1);
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.cookie-category-details strong {
    color: var(--fg);
}

.cookie-modal-footer {
    padding: 2rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

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

.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: var(--border);
    transition: 0.3s;
    border-radius: 26px;
}

.cookie-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background: white;
    transition: 0.3s;
    border-radius: 50%;
}

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

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

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

/* Responsive */
@media (max-width: 768px) {
    .cookie-banner-content {
        flex-direction: column;
        align-items: stretch;
    }
    
    .cookie-banner-actions {
        flex-direction: column;
    }
    
    .cookie-banner-actions .btn {
        width: 100%;
    }
    
    .cookie-modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .cookie-modal-header,
    .cookie-modal-body,
    .cookie-modal-footer {
        padding: 1.5rem;
    }
    
    .cookie-modal-footer {
        flex-direction: column;
    }
    
    .cookie-modal-footer .btn {
        width: 100%;
    }
    
    .cookie-category-header {
        flex-direction: column;
    }
}
