/*
|------------------------------------------------------------------------------------
|   ACCESSIBILITY OVERRIDES (WCAG 2.1 AA)
|   Loaded after app.css. Kept as a standalone file because public/css/app.css is a
|   prebuilt artifact that the current Vite config does not regenerate.
|------------------------------------------------------------------------------------
*/

/* Skip link - hidden until focused */
.skip-link {
    position: absolute;
    left: 16px;
    top: -100px;
    z-index: 100000;
    padding: 12px 20px;
    background: #0b0c0c;
    color: #fff !important;
    font-weight: 700;
    text-decoration: underline;
    border-radius: 0 0 4px 4px;
}
.skip-link:focus {
    top: 0;
}

/* Keep the skip target clear of the sticky navigation */
#main {
    scroll-margin-top: 90px;
}

/*
 * Visible focus indicator. Amber ring with a near-black halo so it stays visible
 * (3:1+) on white, navy, red and photo backgrounds. !important beats the theme's
 * outline:none / box-shadow:none overrides on .btn and .classic_form fields.
 */
html body a:focus-visible,
html body button:focus-visible,
html body input:focus-visible,
html body select:focus-visible,
html body textarea:focus-visible,
html body summary:focus-visible,
html body [tabindex]:focus-visible,
html body [role="button"]:focus-visible {
    outline: 3px solid #ffbf47 !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 7px #0b0c0c !important;
}

/* <main> receives focus from the skip link; it doesn't need a ring */
html body #main:focus,
html body #main:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

/* Cookie notice - real buttons styled like the previous link/icon */
.cookie-alert .accept {
    background: none;
    border: 0;
    padding: 0;
    color: #fff;
    text-decoration: underline;
}
.cookie-alert button.close {
    background: none;
    border: 0;
    padding: 4px;
    color: #fff;
    line-height: 1;
}

/* "Need Help" drawer toggle is now a <button> */
#slider button.handle {
    border: 0;
    color: #fff;
    font-family: inherit;
    line-height: inherit;
}
#slider .handle .handle-label {
    display: block;
    font-size: .75em;
    line-height: 1em;
}

/*
 * Text contrast (WCAG 1.4.3, 4.5:1 minimum)
 * .gray6 (#999) and .gray7 (#777) are only used for blog text on white and on
 * the #e4e4e4 post cards, where they measure 2.2-4.5:1. #595959 gives 5.5-7:1.
 */
.gray6,
.gray7 {
    color: #595959 !important;
}
/* UEI / CAGE / NAICS line sits on the #f8fafc page background (4.48:1 with #6c757d) */
.footer-certifications .text-muted {
    color: #595959 !important;
}

/*
 * Contact forms (WCAG 1.4.11, 3.3.1)
 * Field borders were #ddd (about 1.3:1 on the page background); #767676 meets 3:1.
 */
.classic_form input,
.classic_form textarea {
    border-color: #767676 !important;
}
.classic_form [aria-invalid="true"] {
    border-color: #b0262c !important;
    border-width: 2px !important;
}
.classic_form .field-error {
    display: block;
    margin: -8px 0 12px 18px;
    color: #b0262c;
    font-weight: 700;
    text-align: left;
}
.classic_form .field-hint {
    display: block;
    margin: -8px 0 12px 18px;
    color: #595959;
    text-align: left;
}
.classic_form .form-instructions {
    text-align: left;
}
.form-error-summary {
    margin-bottom: 20px;
    padding: 15px 20px;
    border: 3px solid #b0262c;
    border-radius: 6px;
    background: #fff;
    color: #1a1a1a;
    text-align: left;
}
.form-error-summary a {
    color: #b0262c;
    text-decoration: underline;
}
/* Keep the summary and fields clear of the sticky navigation when focused */
.form-error-summary,
.classic_form input,
.classic_form textarea {
    scroll-margin-top: 110px;
}

/*
 * Button text contrast (WCAG 1.4.3)
 * The theme's base .btn sets #bcc3cb text on #005cae (3.76:1) and loads after
 * Bootstrap, so it overrides white text on .btn-primary/.btn-light. White gives
 * 6.7:1 on blue, 5.0:1 on red, ~18:1 on black. Variants with light/transparent
 * backgrounds (.border-btn, .btn-accent) set dark text with higher specificity
 * and are unaffected.
 * Hover was white on #15ad70 (2.9:1); #0f7d51 is the same green, darker (5.2:1).
 */
.btn {
    color: #fff;
}
.btn:hover {
    background-color: #0f7d51;
    color: #fff;
}
