/* inc/accessibility.css
   Shared accessibility helpers. Include in every standalone page:
     <link rel="stylesheet" href="inc/accessibility.css" />
   (or "../inc/accessibility.css" from a subdirectory)
*/

/* WCAG 2.4.1 Bypass Blocks — skip link.
   Visually hidden until it receives keyboard focus, then slides into view
   at the top-left so a sighted keyboard user can see and activate it. */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #07224B;
    color: #ffffff;
    padding: 8px 16px;
    z-index: 10000;
    text-decoration: none;
    font-weight: bold;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    border: 2px solid #ffffff;
}
.skip-link:focus {
    top: 0;
    outline: 2px solid #FFFF66;
    outline-offset: 2px;
}

/* Optional: make programmatically-focused skip targets visually distinct
   for a moment so sighted keyboard users can see where focus landed. */
[tabindex="-1"]:focus {
    outline: 2px dotted #07224B;
    outline-offset: 2px;
}

/* Styling for the AJAX-loaded content panel used by the public footer
   (Accessibility / Privacy Policy links). The dataarea is hidden via
   inline display:none on pages where it has no default content, and
   toggled visible by the footer click handler. */
.dataarea-panel {
    background: #ffffff;
    padding: 20px;
    margin: 10px auto;
    max-width: 900px;
    box-sizing: border-box;
    text-align: left;
}

/* -------------------------------------------------------------------------
   Shared color tokens used by the footer-loaded fragments below.
   Previously these lived only inline in accessibility.asp, so the
   sub_accessibility.asp fragment rendered unstyled when injected into
   pages that load only this stylesheet. Defined globally here so the
   fragment is styled wherever the footer loads it.
   ------------------------------------------------------------------------- */
:root {
    --color-text-muted: #555555;
    --color-link: #0B3D91;
    --color-link-hover: #062b6b;
    --color-primary: #0B3D91;
}

/* WCAG 1.3.1 / 4.1.2 — visually-hidden helper for screen-reader-only text
   (e.g. "(opens in a new tab)"). Without this defined on the host page the
   text rendered as visible inline content. */
.sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Accessibility / Privacy fragment content panel (sub_accessibility.asp,
   sub_privacypolicy.asp) loaded into #dataarea by the public footer. */
.a11y-panel {
    text-align: left;
    padding: 20px;
}
.a11y-content {
    max-width: 820px;
    margin: 0 auto;
}
.a11y-content h1 {
    text-align: center;
    margin: 8px 0 4px 0;
}
.a11y-content .a11y-lede {
    text-align: center;
    color: var(--color-text-muted);
    margin-top: 0;
}
.a11y-content .a11y-meta {
    text-align: center;
    color: var(--color-text-muted);
    font-size: 14px;
    margin: 0 0 16px 0;
}
.a11y-content h2 {
    margin: 28px 0 8px 0;
    font-size: 22px;
    border-bottom: 2px solid #ccc;
    padding-bottom: 4px;
}
.a11y-content h2:first-of-type { margin-top: 8px; }
.a11y-content p { margin: 8px 0; }
.a11y-content ul {
    margin: 8px 0;
    padding-left: 24px;
    line-height: 1.7;
}
.a11y-content a {
    color: var(--color-link);
    text-decoration: underline;
}
.a11y-content a:hover,
.a11y-content a:focus-visible {
    color: var(--color-link-hover);
}

/* Feedback contact cards inside the accessibility fragment. */
.feedback-card {
    margin: 16px 0;
    padding: 16px 20px;
    background: #f5f5f5;
    border-left: 4px solid var(--color-primary);
    border-radius: 4px;
}
.feedback-card h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
}
.feedback-card .label {
    display: inline-block;
    min-width: 90px;
    font-weight: bold;
}
.feedback-button {
    display: inline-block;
    margin-top: 8px;
    padding: 10px 18px;
    background: var(--color-primary);
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
}
.feedback-button:hover,
.feedback-button:focus-visible {
    background: #062b6b;
    color: #fff;
}
