/* Cookie Banner Styles - WCAG Compliant Modal Dialog */

/* Overlay - Blur background and block interaction */
#cookie-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    pointer-events: auto;
}

/* Cookie Banner - Centered Modal */
#cookie-banner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    max-width: 1200px;
    width: 90%;
    max-height: 95vh;
    overflow-y: auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* Disable scrolling when cookie banner is visible */
body.cookie-modal-open {
    overflow: hidden;
    height: 100vh;
}

/* Cookie banner container styles */
#cookie-banner.fs-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Ensure proper spacing in banner */
#cookie-banner .fs-content {
    width: 100%;
}

/* Focus outline for accessibility */
#cookie-banner:focus {
    outline: 3px solid #4A90E2;
    outline-offset: 2px;
}

/* Button styles - ensure they're clickable */
#cookie-banner button {
    cursor: pointer;
    transition: all 0.3s ease;
}

#cookie-banner button:focus {
    outline: 3px solid #4A90E2;
    outline-offset: 2px;
}

/* Checkbox styles */
#cookie-banner input[type="checkbox"] {
    cursor: pointer;
}

#cookie-banner input[type="checkbox"]:focus {
    outline: 3px solid #4A90E2;
    outline-offset: 2px;
}

/* Enhanced checkbox focus with parent styling */
#cookie-banner .cookieswitch {
    position: relative;
}

#cookie-banner .cookieswitch input[type="checkbox"]:focus {
    outline: 3px solid #4A90E2;
    outline-offset: 2px;
}

/* Focus on label for better visibility */
#cookie-banner .cookieswitch label:has(input:focus) {
    outline: 3px solid #4A90E2;
    outline-offset: 4px;
    border-radius: 4px;
    padding: 4px;
}

/* Alternative focus styling for switch slider */
#cookie-banner .switch input:focus ~ .slider {
    box-shadow: 0 0 10px rgba(74, 144, 226, 0.5), inset 0 0 5px rgba(74, 144, 226, 0.3);
}

/* Link styles */
#cookie-banner a[href]:focus {
    outline: 3px solid #4A90E2;
    outline-offset: 2px;
}

/* Responsive design for smaller screens */
@media (max-width: 768px) {
    #cookie-banner {
        width: 95%;
        max-height: 85vh;
    }
    
    #cookie-banner .fs-col {
        width: 100%;
    }
}

/* Print styles - hide modal on print */
@media print {
    #cookie-overlay,
    #cookie-banner {
        display: none !important;
    }
    
    body.cookie-modal-open {
        overflow: auto;
    }
}
