/* ============================================================
   wcag-s0088-haute.css
   WCAG 2.1 Level AA override for the S0088-Haute Kentico template.

   Selectors verified against the live base CSS pulled from
   https://ascendatelevon.com on 2026-05-07.

   Audit findings:
   - Base CSS (~52KB / 572 rules). No outline-suppression in
     template CSS; Bootstrap still removes them.
   - Form controls — TWO real failures:
       1. .neighborhood-widget .form-control { border:1px solid #999 }
          #999 ≈ 2.85:1 — fails 3:1.
       2. #contactUsEnhancedContainer .form-control
          { background:#f1f1f1; border-bottom:none }
          No visible border at all. Visual cue absent.
   - Sticky elements: .header-menu and #menu-screen-overlay are
     position:fixed; height not declared in those rules.
   - Footer link hover: ul.footer-links li a:hover { color:#999 }
     If footer is dark, that's fine; if light, fails. Verify.

   Specificity strategy:
   Every selector is prefixed with `body #form` to lift above
   widget CSS load order. The form-control fix for
   #contactUsEnhancedContainer keeps its !important because the
   base rule explicitly sets `border-bottom:none` (without a color
   value to override).
   ============================================================ */


/* ------------------------------------------------------------
   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 .btn-primary:focus-visible,
body #form .form-control:focus-visible,
body #form .header-menu: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
   .header-menu is position:fixed. Default 80px scroll-padding;
   adjust after measuring on the live site.
   ------------------------------------------------------------ */
html {
  scroll-padding-top: 80px;
}

body #form :focus-visible {
  scroll-margin-top: 80px;
}


/* ------------------------------------------------------------
   WCAG 1.4.11 Non-text Contrast (form controls)
   Two confirmed failures from base CSS.
   ------------------------------------------------------------ */
body #form .neighborhood-widget .neighborhood-widget__search .form-group .form-control {
  border-color: #595959;
}

body #form #contactUsEnhancedContainer .form-control {
  border-bottom: 1px solid #595959 !important;
}

body #form input.form-control,
body #form select.form-control,
body #form textarea.form-control {
  border-color: #595959;
}

body #form input::placeholder,
body #form textarea::placeholder {
  color: #595959;
  opacity: 1;
}


/* ------------------------------------------------------------
   WCAG 1.4.3 Contrast Minimum (footer disclosure)
   ------------------------------------------------------------ */
body #form .footer-widget footer .footer-disclosure {
  opacity: 0.85;
}


/* ------------------------------------------------------------
   WCAG 1.4.1 Use of Color (inline links)
   ------------------------------------------------------------ */
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)
   Haute's homepage is `<section id="home">` containing
   `.content-home .content-row` and a series of
   `.home-main-content-wrapper` rows. Each row's text content
   lives in `.home-content-sub-content` and `.home-column`.
   The hero/welcome blurb sits in `.content-right.home-column`
   and `.content-left.home-column`. Background captions use
   `.bg-caption`. Homepage CTA buttons use `.button.cta1` /
   `.button.cta2` — opted out.
   ------------------------------------------------------------ */
body #form #home .content-home a,
body #form #home .home-main-content-wrapper a,
body #form #home .home-content-sub-content a,
body #form #home .home-column a,
body #form #home .bg-caption a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

body #form #home a.button,
body #form #home a.cta1,
body #form #home a.cta2,
body #form #home .button.cta1,
body #form #home .button.cta2,
body #form #home .header-ctas a,
body #form #home .homeNav a {
  text-decoration: none;
}


/** ------------------------------------------------------------
   WCAG 2.2 AA 2.5.8 Target Size (Pointer)
   ------------------------------------------------------------ */
body #form header .header-social a {
    width: 24px;
    line-height: 24px;
    margin: 0 5px;
}
/* WCAG 2.2 AA 2.5.8 Target Size (Pointer) — real fix (native checkbox can't be padded;
   appearance:none + explicit 24px sizing; :checked::after re-draws the check so consent UX is preserved) */
body .contact-mobile-form input[type="checkbox"],
#contactusPrivacy input[type="checkbox"],
#privacyDiv input[type="checkbox"],
#contactUsV1Privacy input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 24px; height: 24px;
    min-width: 24px; min-height: 24px;
    margin: 4px; padding: 0;
    border: 2px solid currentColor; border-radius: 3px;
    background: #fff; cursor: pointer; position: relative;
    vertical-align: middle; flex: 0 0 auto;
}
body .contact-mobile-form input[type="checkbox"]:checked::after,
#contactusPrivacy input[type="checkbox"]:checked::after,
#privacyDiv input[type="checkbox"]:checked::after,
#contactUsV1Privacy input[type="checkbox"]:checked::after {
    content: ""; position: absolute; left: 7px; top: 3px;
    width: 6px; height: 11px;
    border: solid #1a1a1a; border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
body .contact-mobile-form input[type="checkbox"]:focus-visible,
#contactusPrivacy input[type="checkbox"]:focus-visible,
#privacyDiv input[type="checkbox"]:focus-visible,
#contactUsV1Privacy input[type="checkbox"]:focus-visible {
    outline: 2px solid; outline-offset: 2px;
}

/* TFS 2987209 — WCAG 2.2 AAA 2.5.5 Target Size (Enhanced): expand the consent
   checkbox's pointer hit-area to 44×44 without changing anything visually
   (Option B, plan §4.4/§0.5 J — live-prototyped pixel-identical to today).
   The painted box stays 24×24 (position:relative already set above); this
   adds a transparent ::before centred over the box that only widens the
   clickable/tappable region. Do not touch :checked::after or :focus-visible
   above, and do not remove min-width/min-height:24px on the box rule above —
   on ContactUsFloating templates that min-width is the only reason the box
   is 24px wide at all (rpWebpartCss_ContactUsFloating.css sets width:auto
   !important, §0.4 D). Uses symmetric inset offsets, not
   left/top:50%+transform: live click-testing found percentage-based
   centering lands ~1-2px off-centre (asymmetric vs. the border-box),
   which stole clicks from an adjacent control (Submit button /
   privacy-policy link) on 3 of 16 templates — insets centre reliably
   regardless of border width. */
body .contact-mobile-form input[type="checkbox"]::before,
#contactusPrivacy input[type="checkbox"]::before,
#privacyDiv input[type="checkbox"]::before,
#contactUsV1Privacy input[type="checkbox"]::before {
    content: "";
    position: absolute;
    top: -12px; left: -12px; right: -12px; bottom: -12px;
}
/* ------------------------------------------------------------
   TFS 2987209 — WCAG 2.2 AAA 2.5.5 Target Size (Enhanced)
   S0088-Haute / Ascend footer (plan §4.3b, Family 1b). This
   template renders <footer class="container-fluid"> and never
   loads footer.min.css (Workstream A's fix does not reach it),
   so it needs its own stanza. Governing base CSS:
   RPcssMaster_S0088-Haute.css, identical across all 20 flagged
   domains. Sizes below are illustrative per the plan — confirmed
   against a live measurement pass (§0.6): legal/social/ADA-HUD
   links measure well under 44px on all 20 domains at all 3
   viewports (no media-query variation to account for).
   ------------------------------------------------------------ */
body #form footer ul.footer-links li a.privacy,
body #form footer ul.footer-links li a.additional-footer-link,
body #form footer .rplogo a {
    display: inline-block;
    min-height: 44px;
    line-height: 44px;
    /* no min-width — these labels already measure 345px+ wide */
}

/* Social icons FAIL ON WIDTH here (measured 39px), not just
   height — the inverse of the usual footer-7/-10 pattern
   (Workstream A). Target the <a>, not the <li> — the <li> carries
   a server-emitted inline style="display:inline-block" attribute
   that beats external CSS targeting it. Do NOT grow the ::before
   glyph (it has a visible painted border, so growing it is a
   visible design change) — only the anchor's invisible hit-box
   grows. */
body #form footer ul.social-list li a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
}

/* ADA/HUD links: font-size:0 on an inline anchor collapses its
   line box to 40x0. The parent #ADA-HUD-Links is hard-capped
   height:30px in RpWebpartCss_AdaHudicons.css — relax the
   parent's height here too, or a 44px anchor overflows the box. */
body #form footer #ADA-HUD-Links {
    height: auto;
    min-height: 44px;
}
body #form footer #ADA-HUD-Links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
}
/* footer .footer-content-social > a (Greystar wordmark) already
   passes at 235x51-85px — intentionally left untouched. */

/* ------------------------------------------------------------
   TFS 2905632 - WCAG 1.4.1 Use of Color (selected state)
   The Floor Plans bed/bath filter and view-switch tabs mark the
   selected item with a brand-color background + #fff text only
   (base rule sets border-color:transparent, no weight/underline).
   Add an underline so the selection is perceivable in greyscale
   and for color-blind users. `body #form` prefix keeps specificity
   above the rpWebpartCss_Floorplan* base bundles. No color changed.
   ------------------------------------------------------------ */
body #form .fp2-bed-bath ul li.active > a,
body #form .FloorPlansV2 .fp-switch-tabs .btn-default.active,
body #form .FloorPlansV3 .fp-switch-tabs .btn-default.active {
  text-decoration: underline;
  text-underline-offset: 3px;
}
