/* cookie-consent.css - Swiss compliant cookie consent styling */

/* Cookie Consent Banner Backdrop */
.cookie-consent-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

/* Main Cookie Consent Modal */
.cookie-consent-modal {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideIn 0.3s ease-out;
}

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

/* Header Section */
.cookie-consent-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 24px;
    text-align: center;
}

.cookie-consent-header h2 {
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 600;
}

.cookie-consent-subtitle {
    margin: 0;
    opacity: 0.9;
    font-size: 14px;
}

/* Content Section */
.cookie-consent-content {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

/* Tab Navigation */
.cookie-consent-tabs {
    display: flex;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.cookie-tab {
    flex: 1;
    padding: 16px 12px;
    border: none;
    background: transparent;
    color: #6b7280;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
    font-size: 14px;
}

.cookie-tab:hover {
    background: #f3f4f6;
    color: #374151;
}

.cookie-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: white;
}

/* Tab Content */
.cookie-tab-content {
    display: none;
    padding: 24px;
    line-height: 1.6;
}

.cookie-tab-content.active {
    display: block;
}

/* Cookie Categories */
.cookie-categories {
    margin-top: 20px;
}

.cookie-category {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 16px;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

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

.category-header {
    background: #f9fafb;
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.category-header label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 0;
    font-weight: 500;
}

.category-header input[type="checkbox"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    accent-color: #667eea;
}

.category-header input[type="checkbox"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.category-title {
    flex: 1;
    color: #374151;
}

.category-required {
    color: #dc2626;
    font-size: 12px;
    font-weight: 400;
    margin-left: 8px;
}

.category-description {
    padding: 16px;
    margin: 0;
    color: #6b7280;
    font-size: 14px;
    background: white;
}

/* Detail Sections */
.cookie-detail-section {
    margin-bottom: 24px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
}

.cookie-detail-section h4 {
    margin: 0 0 12px 0;
    color: #374151;
    font-size: 16px;
}

.cookie-detail-section ul {
    margin: 0;
    padding-left: 20px;
}

.cookie-detail-section li {
    margin-bottom: 8px;
    color: #6b7280;
}

.data-retention {
    background: #fef3c7;
    padding: 12px;
    border-radius: 6px;
    border-left: 4px solid #f59e0b;
    margin-top: 16px;
    font-size: 14px;
}

/* Rights Section */
.rights-section {
    margin-bottom: 24px;
}

.rights-section h4 {
    color: #374151;
    margin: 20px 0 12px 0;
    font-size: 18px;
}

.rights-section ul {
    padding-left: 20px;
}

.rights-section li {
    margin-bottom: 12px;
    color: #4b5563;
}

.contact-info {
    background: #ecfdf5;
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid #10b981;
}

.contact-info h4 {
    margin: 0 0 12px 0;
    color: #065f46;
}

.contact-info p {
    margin: 4px 0;
    color: #047857;
}

/* Action Buttons */
.cookie-consent-actions {
    padding: 24px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.cookie-consent-actions button {
    flex: 1;
    min-width: 140px;
    padding: 12px 16px;
    border-radius: 6px;
    border: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a67d8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: white;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-secondary:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

/* Swiss Compliance Notice */
.swiss-compliance-notice {
    background: #fee2e2;
    padding: 12px 24px;
    border-top: 1px solid #fecaca;
    text-align: center;
}

.swiss-compliance-notice p {
    margin: 0;
    color: #dc2626;
}

/* Settings Button (floating) */
.cookie-settings-button {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    z-index: 1000;
    transition: all 0.2s ease;
    font-size: 20px;
}

.cookie-settings-button:hover {
    background: #5a67d8;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .cookie-consent-backdrop {
        padding: 10px;
    }
    
    .cookie-consent-modal {
        max-height: 95vh;
    }
    
    .cookie-consent-header h2 {
        font-size: 20px;
    }
    
    .cookie-tab {
        padding: 12px 8px;
        font-size: 12px;
    }
    
    .cookie-tab-content {
        padding: 16px;
    }
    
    .category-header {
        padding: 12px;
    }
    
    .cookie-consent-actions {
        padding: 16px;
        flex-direction: column;
    }
    
    .cookie-consent-actions button {
        min-width: auto;
    }
    
    .cookie-settings-button {
        bottom: 15px;
        left: 15px;
        width: 48px;
        height: 48px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .cookie-consent-header {
        padding: 16px;
    }
    
    .cookie-consent-header h2 {
        font-size: 18px;
    }
    
    .cookie-tab {
        padding: 10px 6px;
        font-size: 11px;
    }
}

/* Dark theme compatibility */
@media (prefers-color-scheme: dark) {
    .cookie-consent-modal {
        background: #1f2937;
        color: #f9fafb;
    }
    
    .cookie-consent-tabs {
        background: #374151;
        border-bottom-color: #4b5563;
    }
    
    .cookie-tab {
        color: #9ca3af;
    }
    
    .cookie-tab:hover {
        background: #4b5563;
        color: #d1d5db;
    }
    
    .cookie-tab.active {
        background: #1f2937;
        color: #667eea;
    }
    
    .cookie-category {
        border-color: #4b5563;
        background: #374151;
    }
    
    .category-header {
        background: #4b5563;
        border-bottom-color: #6b7280;
    }
    
    .category-description {
        background: #374151;
        color: #d1d5db;
    }
    
    .cookie-detail-section {
        background: #374151;
    }
    
    .btn-secondary {
        background: #374151;
        color: #f9fafb;
        border-color: #6b7280;
    }
    
    .btn-secondary:hover {
        background: #4b5563;
    }
    
    .cookie-consent-actions {
        background: #374151;
        border-top-color: #4b5563;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .cookie-consent-modal {
        border: 3px solid #000;
    }
    
    .cookie-tab.active {
        border-bottom-width: 4px;
    }
    
    .category-header input[type="checkbox"] {
        border: 2px solid #000;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .cookie-consent-modal {
        animation: none;
    }
    
    .cookie-tab,
    .cookie-category,
    .cookie-consent-actions button {
        transition: none;
    }
}
