/**
 * GDPR Consent Banner Styles
 * 
 * Modern, accessible, and responsive styling for the GDPR consent management system
 * Follows WCAG 2.1 guidelines for accessibility
 * 
 * @version 1.0
 * @author Website Optimization Team
 */

/* Banner Container */
.gdpr-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1a365d 0%, #2d3748 100%);
    color: #ffffff;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.3);
    border-top: 3px solid #4299e1;
    z-index: 10000;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    opacity: 0;
    transform: translateY(100%);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-height: 90vh;
    overflow-y: auto;
}

.gdpr-consent-banner.gdpr-banner-visible {
    opacity: 1;
    transform: translateY(0);
}

.gdpr-consent-banner.gdpr-banner-hiding {
    opacity: 0;
    transform: translateY(100%);
}

/* Banner Content */
.gdpr-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
    position: relative;
}

/* Banner Header */
.gdpr-banner-header {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    gap: 12px;
}

.gdpr-banner-icon {
    font-size: 28px;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}

.gdpr-banner-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Banner Body */
.gdpr-banner-body {
    margin-bottom: 24px;
}

.gdpr-banner-description {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
    color: #e2e8f0;
    max-width: 800px;
}

/* Consent Categories */
.gdpr-consent-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.gdpr-category {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 16px;
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}

.gdpr-category:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(66, 153, 225, 0.5);
    transform: translateY(-2px);
}

.gdpr-category-header {
    margin-bottom: 8px;
}

.gdpr-category-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
}

.gdpr-category-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e0;
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    margin: 0;
}

.gdpr-category-checkbox:checked {
    background: #4299e1;
    border-color: #4299e1;
}

.gdpr-category-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

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

.gdpr-category-name {
    color: #ffffff;
    flex: 1;
}

.gdpr-required {
    color: #f56565;
    font-weight: bold;
    margin-left: 4px;
}

.gdpr-category-description {
    font-size: 13px;
    color: #cbd5e0;
    line-height: 1.4;
    margin: 0;
}

/* Banner Footer */
.gdpr-banner-footer {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.gdpr-banner-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.gdpr-link {
    color: #4299e1;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
    border-bottom: 1px solid transparent;
}

.gdpr-link:hover {
    color: #63b3ed;
    border-bottom-color: #63b3ed;
}

/* Action Buttons */
.gdpr-banner-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.gdpr-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
    position: relative;
    overflow: hidden;
}

.gdpr-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transition: all 0.3s ease;
    transform: translate(-50%, -50%);
}

.gdpr-btn:hover::before {
    width: 300px;
    height: 300px;
}

.gdpr-btn-primary {
    background: #4299e1;
    color: white;
}

.gdpr-btn-primary:hover {
    background: #3182ce;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.4);
}

.gdpr-btn-secondary {
    background: #718096;
    color: white;
}

.gdpr-btn-secondary:hover {
    background: #4a5568;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(113, 128, 150, 0.4);
}

.gdpr-btn-success {
    background: #48bb78;
    color: white;
}

.gdpr-btn-success:hover {
    background: #38a169;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.4);
}

/* Close Button */
.gdpr-banner-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #cbd5e0;
    font-size: 24px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
}

.gdpr-banner-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    transform: scale(1.1);
}

.gdpr-banner-close:focus {
    outline: 2px solid #4299e1;
    outline-offset: 2px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .gdpr-banner-content {
        padding: 20px 16px;
    }
    
    .gdpr-banner-title {
        font-size: 20px;
    }
    
    .gdpr-banner-description {
        font-size: 15px;
    }
    
    .gdpr-consent-categories {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .gdpr-banner-footer {
        gap: 12px;
    }
    
    .gdpr-banner-actions {
        justify-content: stretch;
    }
    
    .gdpr-btn {
        flex: 1;
        min-width: auto;
        padding: 14px 16px;
    }
    
    .gdpr-banner-links {
        justify-content: center;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .gdpr-banner-header {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    
    .gdpr-banner-icon {
        align-self: center;
    }
    
    .gdpr-banner-actions {
        flex-direction: column;
    }
    
    .gdpr-btn {
        width: 100%;
    }
}

/* Focus Styles for Accessibility */
.gdpr-category-checkbox:focus,
.gdpr-btn:focus,
.gdpr-link:focus {
    outline: 2px solid #4299e1;
    outline-offset: 2px;
}

/* Animation for category expansion */
@keyframes gdpr-category-appear {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.gdpr-category {
    animation: gdpr-category-appear 0.3s ease forwards;
}

.gdpr-category:nth-child(1) { animation-delay: 0.1s; }
.gdpr-category:nth-child(2) { animation-delay: 0.2s; }
.gdpr-category:nth-child(3) { animation-delay: 0.3s; }
.gdpr-category:nth-child(4) { animation-delay: 0.4s; }

/* High contrast mode support */
@media (prefers-contrast: high) {
    .gdpr-consent-banner {
        background: #000000;
        border-top-color: #ffffff;
    }
    
    .gdpr-category {
        background: #1a1a1a;
        border-color: #ffffff;
    }
    
    .gdpr-btn-primary {
        background: #0066cc;
    }
    
    .gdpr-btn-secondary {
        background: #666666;
    }
    
    .gdpr-btn-success {
        background: #008800;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .gdpr-consent-banner,
    .gdpr-category,
    .gdpr-btn,
    .gdpr-banner-close {
        transition: none;
        animation: none;
    }
    
    .gdpr-consent-banner.gdpr-banner-visible {
        opacity: 1;
        transform: none;
    }
}

/* Print styles */
@media print {
    .gdpr-consent-banner {
        display: none;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .gdpr-consent-banner {
        background: linear-gradient(135deg, #0d1117 0%, #161b22 100%);
        border-top-color: #58a6ff;
    }
    
    .gdpr-category {
        background: rgba(255, 255, 255, 0.05);
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .gdpr-category:hover {
        background: rgba(255, 255, 255, 0.08);
        border-color: rgba(88, 166, 255, 0.3);
    }
} 