/* RCI Accessibility 1.0.0: fixes for the Silktide WCAG 2.2 report (October 2026).
   Loaded after the theme on front-end pages by the rci_a11y module. */

/* ---------- 1.4.10 Reflow: nothing should scroll sideways at 320px ---------- */
.crumbs .container { flex-wrap: wrap; row-gap: 4px; }
.crumbs .container > * { min-width: 0; overflow-wrap: anywhere; }
.foot-main > * { min-width: 0; }
.foot-main a { overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .foot-main { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 480px) {
  main :not(pre) > code { white-space: normal; overflow-wrap: anywhere; }
  main a, main td, main li { overflow-wrap: anywhere; }
  main .sx-tabs { flex-wrap: wrap; }
  main .sx-tabs a, main .paths .path, main .az-list .az-row, main .svc-tools .search-wrap { min-width: 0; }
  main .paths { grid-template-columns: 1fr !important; }
  main .svc-tools, main .search-wrap { flex-wrap: wrap; max-width: 100%; }
  main .search-wrap input { min-width: 0; width: 100%; }
  main .cmp-wrap { max-width: 100%; overflow-x: auto; }
  main :is(.btn, .sx-btn, [class*="-btn"]) { white-space: normal; max-width: 100%; }
  main .path { max-width: 100%; }
}

/* ---------- 1.4.1 Links must not rely on colour alone ---------- */
.foot-bottom a,
.foot-bottom p a { text-decoration: underline; text-underline-offset: 3px; }
main :is(p, li, td, dd) a:not([class]):not(:has(img)) { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- 1.4.3 Text contrast ---------- */
.lv-jobs span { color: #5f656b; }

/* ---------- 2.4.7 Visible focus on every control ---------- */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid #1a5fb4 !important;
  outline-offset: 2px !important;
}
:where(.foot-bottom, .site-footer, .nav-wrapper, .hero, [class*="hero"]) :where(a, button, input):focus-visible {
  outline-color: #ffffff !important;
  box-shadow: 0 0 0 5px #1a5fb4 !important;
}

/* ---------- 1.4.11 Form fields stand out from the page (3:1) ---------- */
:is(main, .hero, [class*="hero"], .page-content, #block-rci-page-content) :is(input[type="text"], input[type="search"], input[type="email"], input[type="number"], input[type="url"], input[type="tel"], input:not([type]), select, textarea):not(.nav-wrapper *, header *) {
  border: 1px solid #6b7280 !important;
}

/* ---------- 2.5.8 Target size: at least 24px or enough space ---------- */
.foot-bottom a { display: inline-block; padding-block: 3px; min-height: 24px; }
main :is(sup a, a[href^="#req"], a[href^="#fn"], a[href^="#ref"]) {
  display: inline-block; min-width: 24px; min-height: 24px; line-height: 24px; text-align: center;
}
main :is(li, td):not([class]) > a:only-child:not([class]) { display: inline-block; padding-block: 2px; min-height: 24px; }

/* ---------- Link lists added by rci-a11y.js (1.3.1) ---------- */
.rci-list, .rci-li { display: contents; }

/* Screen-reader-only text (matches Drupal's visually-hidden) */
.rci-sr {
  position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important;
  clip: rect(1px, 1px, 1px, 1px) !important; white-space: nowrap !important; word-wrap: normal !important;
}
