/* ============================================================
   wcag-s0085-slate.css
   WCAG 2.1 Level AA override for the S0085-Slate Kentico template.
   Owner of TFS 2852272 (1.4.3 Body/UI text contrast).

   Selectors verified against the live base CSS pulled from
   https://somersettownhomes.com on 2026-05-07.

   Audit findings:
   - Base CSS is sparse (~20KB / 191 rules). No outline-suppression,
     no sticky-header rules, no form-control rules in template's
     own CSS — almost everything inherits from Bootstrap and the
     shared footer.min.css.
   - The TFS 2852272 text-contrast issue is NOT visible in the
     template CSS dump. The failing rule may be in:
       a) Bootstrap defaults applied without override
       b) A shared widget CSS file (cookies, social, etc.)
       c) Inline styles in widget instances
     Refine this file during deploy testing — open the live page,
     run Silktide/devtools, identify the exact element/selector
     flagged, and add a targeted override here.

   Specificity strategy:
   Every selector is prefixed with `body #form` to lift above
   widget CSS load order.
   ============================================================ */


/* ------------------------------------------------------------
   WCAG 2.4.7 Focus Visible
   Bootstrap suppressors plus general fallback.
   ------------------------------------------------------------ */
body #form .navbar-toggle:focus-visible,
body #form .dropdown-toggle:focus-visible,
body #form .btn:focus-visible,
body #form .form-control:focus-visible,
body #form a:focus-visible,
body #form button:focus-visible,
body #form input:focus-visible,
body #form select:focus-visible,
body #form textarea:focus-visible,
body #form [tabindex]:focus-visible,
body #form [role="button"]:focus-visible,
body #form .footer-widget footer a:focus-visible {
  /* Webkit-style two-ring halo: blue inner ring + white outer ring
     gives focus visibility on both light AND dark backgrounds.
     The `outline` declaration is intentionally omitted — outline
     paints on top of box-shadow and would cover the white ring. */
  outline-offset: 2px;
  box-shadow: 0 0 0 2px #005fcc, 0 0 0 3px #fff;
}


/* ------------------------------------------------------------
   WCAG 2.4.11 Focus Not Obscured
   Default 80px scroll-padding. Measure the actual sticky header
   height on the live site and adjust.
   ------------------------------------------------------------ */
html {
  scroll-padding-top: 80px;
}

body #form :focus-visible {
  scroll-margin-top: 80px;
}


/* ------------------------------------------------------------
   WCAG 1.4.11 Non-text Contrast (form controls)
   No template-specific form rules audited. Defensive override
   on generic form inputs.
   ------------------------------------------------------------ */
body #form input.form-control,
body #form select.form-control,
body #form textarea.form-control,
body #form input[type="text"],
body #form input[type="email"],
body #form input[type="tel"],
body #form input[type="search"],
body #form input[type="number"],
body #form input[type="password"],
body #form select,
body #form textarea {
  border-color: #595959;
}


/* ------------------------------------------------------------
   WCAG 1.4.3 Contrast Minimum (TFS 2852272 — body/UI text)
   PLACEHOLDER — exact failing selector not visible in template
   CSS. After deploy + Silktide rescan, replace this block with
   the targeted override for whatever element actually fails.
   Common likely offenders below as defensive defaults.
   ------------------------------------------------------------ */
body #form .text-muted,
body #form .muted,
body #form small.text-muted,
body #form .caption,
body #form .helper-text {
  color: #595959;
}

body #form .footer-widget footer .footer-disclosure {
  opacity: 0.85;
}


/* ------------------------------------------------------------
   WCAG 1.4.1 Use of Color (inline links)
   Defensive underline + button opt-outs. Update content selector
   after inspecting live DOM.
   ------------------------------------------------------------ */
body #form .main-content-text a,
body #form .inner-page-main-content a,
body #form .mainContent a,
body #form main p a,
body #form article p a,
body #form .content p a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

body #form .btn,
body #form .button,
body #form header a,
body #form nav a,
body #form .navbar a,
body #form footer a,
body #form .footer-widget footer a,
body #form .footer-CTA-Button,
body #form .header-CTA-button,
body #form a.more-link,
body #form a.less-link {
  text-decoration: none;
}


/* ------------------------------------------------------------
   TFS 2870264 — WCAG 1.4.1 (homepage inline links)
   Slate's homepage welcome blurb lives in `.homeWelcomeText`
   (inside `.homeCta1`); the second CTA's text block is
   `.homeCta2Holder` (which also contains `.homeCta2Button`,
   a button — opted out below). The generic interior-page
   selectors above don't reach these widgets.
   ------------------------------------------------------------ */
body #form .homeWelcomeText a,
body #form .homeCta1 .homeWelcomeText a,
body #form .homeCta2Holder a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

body #form .homeCta2Button,
body #form a.homeCta2Button {
  text-decoration: none;
}
