/* Cookie Banner Styles - DSGVO-konform */
/* Passend zum Cyberplex Design */

/* Overlay Backdrop */
.cookie-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(var(--cp-deep-rgb), 0.92);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cookie-banner.active {
    opacity: 1;
    visibility: visible;
}

/* Cookie Content Container */
.cookie-content {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 40px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.cookie-banner.active .cookie-content {
    transform: translateY(0);
}

/* Title */
.cookie-content h2 {
    color: var(--primary-color);
    font-size: 1.75rem;
    margin-bottom: 16px;
    text-align: center;
}

/* Description */
.cookie-content > p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 32px;
    text-align: center;
}

/* Cookie Categories */
.cookie-categories {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 32px;
}

/* Individual Category */
.cookie-category {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border-color);
}

.cookie-category.always-active {
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--cp-tint) 100%);
}

/* Category Header */
.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    cursor: pointer;
}

.category-header span:first-child {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1rem;
}

.category-header p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}

/* Always On Badge */
.always-on {
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Toggle Switch */
.cookie-toggle {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 48px;
    height: 26px;
    background: var(--border-color);
    border-radius: 13px;
    cursor: pointer;
    transition: background 0.3s ease;
    flex-shrink: 0;
}

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

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

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

/* Focus styles for accessibility */
.cookie-toggle:focus + .toggle-slider {
    box-shadow: 0 0 0 3px var(--cp-focus);
}

/* Cookie Actions */
.cookie-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.cookie-actions .btn {
    padding: 12px 24px;
    font-size: 0.9rem;
    min-width: 140px;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .cookie-banner {
        padding: 0;
        align-items: flex-end;
    }
    
    .cookie-content {
        border-radius: 20px 20px 0 0;
        padding: 30px 20px;
        max-height: 85vh;
        transform: translateY(100%);
    }
    
    .cookie-banner.active .cookie-content {
        transform: translateY(0);
    }
    
    .cookie-content h2 {
        font-size: 1.5rem;
    }
    
    .cookie-category {
        padding: 16px;
    }
    
    .cookie-actions {
        flex-direction: column;
    }
    
    .cookie-actions .btn {
        width: 100%;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .cookie-banner,
    .cookie-content,
    .toggle-slider,
    .toggle-slider::before {
        transition: none;
    }
    
    .cookie-content {
        transform: none;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .cookie-category {
        border-width: 2px;
    }
    
    .toggle-slider {
        border: 2px solid var(--text-dark);
    }
}
