/* Cookie Consent Banner Styles */
.cookie-consent-banner {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    z-index: 9999;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15);
    border-top: 1px solid #e2e8f0;
    padding: 1.5rem;
    transition: bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 90vh;
    overflow-y: auto;
}

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

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .cookie-consent-banner {
        background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
        border-top-color: #334155;
        color: #f8f9fa;
    }
}

.cookie-consent-content {
    max-width: 1200px;
    margin: 0 auto;
}

.cookie-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.cookie-icon {
    font-size: 2rem;
    line-height: 1;
}

.cookie-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    color: #1e293b;
}

@media (prefers-color-scheme: dark) {
    .cookie-header h3 {
        color: #f8f9fa;
    }
}

.cookie-text {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: #475569;
    margin: 0 0 1.5rem;
}

@media (prefers-color-scheme: dark) {
    .cookie-text {
        color: #cbd5e1;
    }
}

.cookie-link {
    color: #1565c0;
    text-decoration: underline;
    font-weight: 600;
}

.cookie-link:hover {
    color: #0d47a1;
}

@media (prefers-color-scheme: dark) {
    .cookie-link {
        color: #60a5fa;
    }
    .cookie-link:hover {
        color: #93c5fd;
    }
}

.cookie-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-end;
}

.cookie-btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.cookie-btn-primary {
    background: #1565c0;
    color: white;
    box-shadow: 0 2px 8px rgba(21, 101, 192, 0.3);
}

.cookie-btn-primary:hover {
    background: #0d47a1;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(21, 101, 192, 0.4);
}

.cookie-btn-secondary {
    background: #e2e8f0;
    color: #1e293b;
}

.cookie-btn-secondary:hover {
    background: #cbd5e1;
}

@media (prefers-color-scheme: dark) {
    .cookie-btn-secondary {
        background: #334155;
        color: #f8f9fa;
    }
    .cookie-btn-secondary:hover {
        background: #475569;
    }
}

.cookie-btn-text {
    background: transparent;
    color: #64748b;
    text-decoration: underline;
}

.cookie-btn-text:hover {
    color: #1e293b;
}

@media (prefers-color-scheme: dark) {
    .cookie-btn-text {
        color: #94a3b8;
    }
    .cookie-btn-text:hover {
        color: #f8f9fa;
    }
}

/* Cookie Categories */
.cookie-categories {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.5rem 0;
}

.cookie-category {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1rem;
}

@media (prefers-color-scheme: dark) {
    .cookie-category {
        background: #0f172a;
        border-color: #334155;
    }
}

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

.cookie-category-header strong {
    display: block;
    color: #1e293b;
    font-size: 0.9375rem;
    margin-bottom: 0.25rem;
}

@media (prefers-color-scheme: dark) {
    .cookie-category-header strong {
        color: #f8f9fa;
    }
}

.cookie-category-header p {
    margin: 0;
    font-size: 0.8125rem;
    color: #64748b;
    line-height: 1.5;
}

@media (prefers-color-scheme: dark) {
    .cookie-category-header p {
        color: #94a3b8;
    }
}

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

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

.cookie-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.3s;
    border-radius: 24px;
}

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

.cookie-switch input:checked + .cookie-slider {
    background-color: #1565c0;
}

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

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

/* Responsive */
@media (max-width: 640px) {
    .cookie-consent-banner {
        padding: 1rem;
    }
    
    .cookie-actions {
        flex-direction: column;
    }
    
    .cookie-btn {
        width: 100%;
        justify-content: center;
    }
    
    .cookie-category-header {
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* Scrollbar customization for settings */
.cookie-consent-banner::-webkit-scrollbar {
    width: 8px;
}

.cookie-consent-banner::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.cookie-consent-banner::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.cookie-consent-banner::-webkit-scrollbar-thumb:hover {
    background: #1565c0;
}

@media (prefers-color-scheme: dark) {
    .cookie-consent-banner::-webkit-scrollbar-track {
        background: #0f172a;
    }
    
    .cookie-consent-banner::-webkit-scrollbar-thumb {
        background: #334155;
    }
}
