/* Accessibility Styles for FLAG Website */

/* Screen Reader Only Content */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.sr-only.focus:focus,
.sr-only.focus:focus-within,
.focus\:not-sr-only:focus {
    position: static !important;
    width: auto !important;
    height: auto !important;
    padding: inherit !important;
    margin: inherit !important;
    overflow: visible !important;
    clip: auto !important;
    white-space: normal !important;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .bg-brand-red {
        background-color: #C41E3A !important;
        border: 2px solid #000000 !important;
    }
    
    .bg-brand-yellow {
        background-color: #FFD700 !important;
        color: #000000 !important;
        border: 2px solid #000000 !important;
    }
    
    .text-brand-red {
        color: #C41E3A !important;
    }
    
    .text-brand-yellow {
        color: #B8860B !important;
    }
    
    .border-brand-red {
        border-color: #C41E3A !important;
    }
}

/* Reduced Motion Support */
/*@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .flag-buoy-spin {
        animation: none !important;
    }
    
    .hover\:scale-105:hover,
    .hover\:scale-107:hover,
    .hover\:scale-110:hover {
        transform: none !important;
    }
}*/

/* Enhanced Focus Styles */
.focus-enhanced:focus,
.focus-enhanced:focus-visible {
    outline: 3px solid #FFD700 !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 2px #C41E3A !important;
}

/* Custom focus styles for buttons and interactive elements */
button:focus,
a:focus,
input:focus,
textarea:focus,
select:focus,
[tabindex]:focus {
    outline: 2px solid #FFD700 !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 4px rgba(255, 215, 0, 0.3) !important;
}

/* Ensure text is selectable and readable */
.text-contrast-enhanced {
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
}

/* Error and validation message styling */
.validation-error {
    color: #C41E3A !important;
    font-weight: 600;
}

.validation-error::before {
    content: "?? ";
    margin-right: 0.25rem;
}

/* Loading states for better UX */
[aria-busy="true"] {
    cursor: wait;
    opacity: 0.7;
}

/* Modal and overlay accessibility */
.modal-overlay {
    backdrop-filter: blur(4px);
}

.modal-content:focus-within {
    outline: none;
}

/* Language support */
[lang] {
    font-feature-settings: normal;
}