/**
 * Accessibility Enhancements - ne-dhhs-license-search
 *
 * WCAG 2.2 Level A/AA contrast fixes and accessibility improvements.
 * Applied on top of platform e_mau/flat-ui CSS.
 * Uses !important where platform CSS overrides are needed.
 *
 * WCAG Success Criteria:
 * - 1.4.3 Contrast (Minimum) Level AA: all text meets 4.5:1 minimum
 * - 2.4.1 Bypass Blocks (Level A): skip link visible on focus
 */

/* ============================================================
   Footer contrast fixes (dark background from platform CSS)
   Background: rgb(50, 58, 69) / #323a45
   Minimum passing color for 4.5:1: approx #8c9daf or lighter
   Using #E0E0E0 = 8.2:1 against #323a45
   ============================================================ */

/* Section headings */
footer .dim-header {
    color: #E0E0E0 !important;
}

/* Body text and copyright */
footer p,
footer address {
    color: #E0E0E0 !important;
}

/* Spans inside footer paragraphs (copyright year etc.) */
footer p span {
    color: #E0E0E0 !important;
}

/* Links in footer - #66B3FF = 4.51:1 against #323a45 */
footer a,
footer a:link,
footer a:visited {
    color: #66B3FF !important;
}

footer a:hover,
footer a:focus {
    color: #99CCFF !important;
}

/* ============================================================
   Button contrast fixes
   Platform .btn-primary uses #00a6d2 (2.84:1 with white - FAILS)
   #046b99 = 5.71:1 with white - PASSES
   ============================================================ */

.btn-primary,
.btn-primary:link,
.btn-primary:visited {
    background-color: #046b99 !important;
    border-color: #035881 !important;
    color: #ffffff !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active {
    background-color: #035881 !important;
    border-color: #024566 !important;
    color: #ffffff !important;
}

/* ============================================================
   Content area link contrast
   Platform link color #02bfe7 on white bg = 2.59:1 (FAILS 1.4.3)
   #046b99 on white = 5.88:1 (PASSES AA)
   Targets text links in the main .content div; .btn-styled links
   are excluded via :not(.btn) so button-shaped links (e.g. the
   "Back to Search" button on the results page) are unaffected.
   Footer and navbar link rules are also separate and unaffected.
   ============================================================ */

.content a:not(.btn),
.content a:not(.btn):link,
.content a:not(.btn):visited {
    color: #046b99 !important;
}

.content a:not(.btn):hover,
.content a:not(.btn):focus {
    color: #035881 !important;
}

/* ============================================================
   .text-muted contrast fix
   Platform renders rgb(156,163,175)/#9ca3af = 2.53:1 on white - FAILS 1.4.3
   #6b6b6b = 5.32:1 on white, 5.06:1 on Bootstrap table-striped #f9f9f9 - PASSES AA
   Dark enough to be legible; light enough to read as secondary/muted vs body text
   ============================================================ */

.text-muted {
    color: #6b6b6b !important;
}

/* ============================================================
   .btn-success contrast fix
   Platform uses rgb(74,165,100)/#4aa564 = 3.08:1 with white - FAILS 1.4.3
   #1e7e34 = 5.13:1 with white - PASSES AA
   ============================================================ */

.btn-success,
.btn-success:link,
.btn-success:visited {
    background-color: #1e7e34 !important;
    border-color: #19692c !important;
    color: #ffffff !important;
}

.btn-success:hover,
.btn-success:focus,
.btn-success:active,
.btn-success.active {
    background-color: #155724 !important;
    border-color: #0f3d1a !important;
    color: #ffffff !important;
}

/* ============================================================
   Sidebar "Practitioner Lists" well link contrast
   Kept for specificity; .well is inside .content so both rules
   agree on #046b99 — no conflict. .btn links excluded so
   button-shaped links inside .well (e.g. form-actions wells)
   keep their own color.
   ============================================================ */

.well a:not(.btn),
.well a:not(.btn):link,
.well a:not(.btn):visited {
    color: #046b99 !important;
}

.well a:not(.btn):hover,
.well a:not(.btn):focus {
    color: #035881 !important;
}

/* ============================================================
   Dynamically injected glyphicons (error states via AJAX)
   Covers any glyphicon span not statically in templates
   ============================================================ */

.glyphicon[class*="glyphicon-"] {
    speak: never; /* Legacy property */
}

/* ============================================================
   Sub-heading contrast fix - AJAX search stubs
   <small> inside h2.h4 in panel-body (individual/business/facility stubs)
   Platform e_mau renders small at rgb(156,163,175) = 2.53:1 on white - FAILS 1.4.3
   #6b7280 = 4.83:1 on white - PASSES AA (retains blue-gray tone of the app palette)
   ============================================================ */

.panel-body h2 small {
    color: #6b7280 !important;
}

/* ============================================================
   Skip link - visible on keyboard focus
   Bootstrap 3 sr-only-focusable handles this but ensure
   the focused state has sufficient contrast (21:1 black on white)
   ============================================================ */

.sr-only-focusable:focus {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    white-space: normal;
    background: #fff;
    color: #000;
    padding: 4px 8px;
    z-index: 9999;
    text-decoration: underline;
}
