/**
 * Accessibility Enhancement Styles
 * Addresses WCAG 2.2 Level AA contrast and visual accessibility issues
 */

/* Google Translate Widget Contrast Improvements
 * WCAG 1.4.3 Contrast (Minimum) - Level AA
 * Overrides insufficient contrast in Google Translate widget
 * Uses aggressive selectors to override inline styles and nested structure
 */

/* Target ALL spans within Google Translate widget, including deeply nested ones */
.goog-te-gadget span,
.goog-te-gadget a span,
.goog-te-gadget div span,
footer .goog-te-gadget span,
footer [class*="goog-te"] span,
#google_translate_element span {
    color: #E0E0E0 !important; /* Light gray text for contrast against dark footer background */
}

/* Specifically target the aria-hidden span that causes contrast issues */
.goog-te-gadget span[aria-hidden="true"],
.goog-te-gadget a span[aria-hidden="true"] {
    color: #E0E0E0 !important;
}

/* Border overrides - multiple approaches to ensure coverage */
.goog-te-gadget span[style*="border-left"],
.goog-te-gadget a span[style*="border-left"],
.goog-te-gadget span[style*="border"],
footer .goog-te-gadget span[style*="border"] {
    border-left-color: #CCCCCC !important; /* Lighter gray border for contrast against dark footer (7:1 ratio) */
    border-color: #CCCCCC !important;
}

/* Ensure Google Translate link text has sufficient contrast */
.goog-te-gadget a,
.goog-te-gadget-simple a,
#google_translate_element a {
    color: #66B3FF !important; /* Light blue for sufficient contrast against dark footer */
}

/* Hero Section Text Contrast Enhancement
 * WCAG 1.4.3 Contrast (Minimum) - Level AA
 * Adds text shadow to improve readability against background image
 */
.hero .agency-name a {
    text-shadow:
        1px 1px 2px rgba(0, 0, 0, 0.8),
        -1px -1px 2px rgba(0, 0, 0, 0.8),
        1px -1px 2px rgba(0, 0, 0, 0.8),
        -1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* Skip Link Visibility Enhancement
 * WCAG 2.4.1 Bypass Blocks - Level A
 * Ensures skip link is highly visible when focused
 */
.sr-only-focusable:focus {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10000;
    padding: 10px 15px;
    background-color: #000000;
    color: #ffffff;
    text-decoration: none;
    border-radius: 3px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
/* Nebraska Interactive Footer Link Enhancement
 * WCAG 1.4.3 Contrast (Minimum) - Level AA
 * Adds underline to distinguish link from surrounding text when contrast is insufficient
 */
.ni-mention a,
footer .ni-mention a {
    text-decoration: underline !important;
    text-decoration-thickness: 2px !important;
}

/* Ensure underline is visible on hover and focus */
.ni-mention a:hover,
.ni-mention a:focus,
footer .ni-mention a:hover,
footer .ni-mention a:focus {
    text-decoration: underline !important;
    text-decoration-thickness: 2px !important;
    text-decoration-color: currentColor !important;
}

/* Alert Info Box Contrast Fix
 * WCAG 1.4.3 Contrast (Minimum) - Level AA
 * Ensures alert-info boxes have sufficient text contrast (4.5:1 minimum)
 */
.alert-info,
.alert-solid.alert-info {
    background-color: #0056b3 !important; /* Dark blue background */
    color: #FFFFFF !important; /* White text for strong contrast (10:1 ratio) */
}

.alert-info a,
.alert-solid.alert-info a {
    color: #FFEB3B !important; /* Bright yellow for links against dark blue */
    text-decoration: underline !important;
}

.alert-info i,
.alert-solid.alert-info i {
    color: #FFFFFF !important; /* White icons */
}
