/**
 * GDPR Cookie Consent Banner Styles
 * German-compliant design with clear opt-in/opt-out options
 */

#cookie-consent-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    opacity: 1;
    transition: opacity 0.3s ease;
}

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

.cookie-consent-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideInUp 0.3s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translate(-50%, -40%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.cookie-consent-header {
    padding: 24px 24px 16px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.cookie-consent-header h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #111827;
}

.cookie-consent-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.cookie-consent-intro {
    font-size: 15px;
    line-height: 1.6;
    color: #374151;
    margin-bottom: 20px;
}

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

.cookie-category {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    background: #f9fafb;
    transition: all 0.2s ease;
}

.cookie-category:hover {
    border-color: #d1d5db;
    background: #ffffff;
}

.cookie-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cookie-category-info {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.cookie-category-title {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    flex: 1;
    font-weight: 600;
    font-size: 15px;
    color: #111827;
}

.cookie-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #6366f1;
}

.cookie-checkbox:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

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

.cookie-required {
    font-size: 12px;
    color: #ef4444;
    font-weight: 600;
    background: #fee2e2;
    padding: 2px 8px;
    border-radius: 6px;
}

.cookie-optional {
    font-size: 12px;
    color: #3b82f6;
    font-weight: 600;
    background: #dbeafe;
    padding: 2px 8px;
    border-radius: 6px;
}

.cookie-expand-btn {
    background: transparent;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 16px;
}

.cookie-expand-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.cookie-details {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
    font-size: 14px;
    line-height: 1.6;
    color: #6b7280;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}

.cookie-details p {
    margin: 8px 0;
}

.cookie-details strong {
    color: #374151;
}

.cookie-consent-footer-info {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
    font-size: 13px;
    color: #6b7280;
}

.cookie-consent-footer-info a {
    color: #6366f1;
    text-decoration: underline;
}

.cookie-consent-footer-info a:hover {
    color: #4f46e5;
}

.cookie-consent-footer {
    padding: 20px 24px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 10px;
    background: #f9fafb;
    flex-wrap: wrap;
}

.cookie-btn {
    flex: 1;
    min-width: 140px;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    white-space: nowrap;
}

.cookie-btn-primary {
    background: #6366f1;
    color: white;
}

.cookie-btn-primary:hover {
    background: #4f46e5;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.cookie-btn-secondary {
    background: #10b981;
    color: white;
}

.cookie-btn-secondary:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.cookie-btn-ghost {
    background: transparent;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.cookie-btn-ghost:hover {
    background: #f3f4f6;
    color: #374151;
    border-color: #9ca3af;
}

/* Responsive Design */
@media (max-width: 640px) {
    .cookie-consent-modal {
        width: 95%;
        max-height: 90vh;
    }
    
    .cookie-consent-header {
        padding: 20px 16px 12px 16px;
    }
    
    .cookie-consent-header h3 {
        font-size: 20px;
    }
    
    .cookie-consent-body {
        padding: 16px;
    }
    
    .cookie-consent-footer {
        padding: 16px;
        flex-direction: column;
    }
    
    .cookie-btn {
        min-width: 100%;
        width: 100%;
    }
    
    .cookie-category-title {
        font-size: 14px;
    }
}

/* Accessibility */
.cookie-btn:focus,
.cookie-checkbox:focus,
.cookie-expand-btn:focus {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

.cookie-checkbox:focus-visible,
.cookie-btn:focus-visible,
.cookie-expand-btn:focus-visible {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    .cookie-consent-modal {
        background: #1f2937;
        color: #f9fafb;
    }
    
    .cookie-consent-header {
        border-bottom-color: #374151;
    }
    
    .cookie-consent-header h3 {
        color: #f9fafb;
    }
    
    .cookie-consent-intro {
        color: #d1d5db;
    }
    
    .cookie-category {
        background: #111827;
        border-color: #374151;
    }
    
    .cookie-category:hover {
        background: #1f2937;
        border-color: #4b5563;
    }
    
    .cookie-category-title {
        color: #f9fafb;
    }
    
    .cookie-details {
        border-top-color: #374151;
        color: #9ca3af;
    }
    
    .cookie-details strong {
        color: #d1d5db;
    }
    
    .cookie-consent-footer {
        background: #111827;
        border-top-color: #374151;
    }
    
    .cookie-expand-btn {
        border-color: #4b5563;
    }
    
    .cookie-expand-btn:hover {
        background: #374151;
        border-color: #6b7280;
    }
    
    .cookie-consent-footer-info {
        border-top-color: #374151;
        color: #9ca3af;
    }
    
    .cookie-btn-ghost {
        color: #9ca3af;
        border-color: #4b5563;
    }
    
    .cookie-btn-ghost:hover {
        background: #374151;
        color: #d1d5db;
        border-color: #6b7280;
    }
}
