/* ============================================================
   wcag-s0069-gs-grids.css
   WCAG 2.1 Level AA override for the S0069-Grids Kentico template
   (TemplateId 1363, DefaultCssFileName: RPcssMaster_S0069-GS-Grids).

   Selectors verified against the live base CSS pulled from
   https://thehillapts.com on 2026-05-12.

   This template namespaces all base rules under .template-grids.
   Brand palette is gold #ddb563 + terracotta #c67e65 â both
   fail 4.5:1 on white as link/text colors.

   First flagged by Ron in TFS 2845711 (The Hill /
   thehillapts.com) as outside the current 8-template
   remediation scope. This file brings it in.
   ============================================================ */


/* ------------------------------------------------------------
   WCAG 2.4.7 Focus Visible
   Base suppresses outlines on:
     .template-grids a:hover { outline:0 }
     .template-grids a:hover, .template-grids a:focus
       { outline-color:transparent; outline-style:none }
     .template-grids .contact-widget .sumbitbutton input.active
       { outline:none !important }
     .template-grids .floorplan-search-bar .floorplan-search-moveindate:focus
       { outline:none }
   Plus Bootstrap's .navbar-toggle:focus, .dropdown-toggle:focus.
   The base's !important on submit-button outline forces ours to
   use !important for that selector class.
   ------------------------------------------------------------ */
.template-grids a:focus-visible,
.template-grids button:focus-visible,
.template-grids .btn:focus-visible,
.template-grids .btn-primary:focus-visible,
.template-grids .navbar-toggle:focus-visible,
.template-grids .dropdown-toggle:focus-visible,
.template-grids .top-bar a:focus-visible,
.template-grids .contact-widget input:focus-visible,
.template-grids .contact-us-enhanced .form-control:focus-visible,
.template-grids .floorplan-search-bar .floorplan-search-moveindate:focus-visible,
.template-grids .FloorPlansV3 a:focus-visible,
.template-grids input:focus-visible,
.template-grids select:focus-visible,
.template-grids textarea:focus-visible,
.template-grids [tabindex]:focus-visible,
.template-grids [role="button"]:focus-visible,
.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;
}

.template-grids .contact-widget .sumbitbutton input: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 !important;
  box-shadow: 0 0 0 2px #005fcc, 0 0 0 3px #fff !important;
}


/* ------------------------------------------------------------
   WCAG 2.4.11 Focus Not Obscured
   Header height not declared in master CSS (shared header
   resources). Use 100px scroll padding (Balcony default).
   ------------------------------------------------------------ */
html {
  scroll-padding-top: 100px;
}

.template-grids :focus-visible {
  scroll-margin-top: 100px;
}


/* ------------------------------------------------------------
   WCAG 1.4.11 Non-text Contrast (form controls)
   Base: .template-grids .contact-us-enhanced .form-group .form-control
         { border:1px solid #ebe9e9 }
   #ebe9e9 on white â 1.18:1 â fails 3:1. Bump to #595959.
   ------------------------------------------------------------ */
.template-grids .contact-us-enhanced .form-group .form-control {
  border-color: #595959;
}

body #contactUsEnhancedContainer .form-control {
  border-bottom: 1px solid #595959 !important;
}


/* ------------------------------------------------------------
   WCAG 1.4.3 Contrast Minimum (text)
   Base failures:
     1. .template-grids .FloorPlansV3 a { color:#c67e65 } â 3.41:1
        â fails 4.5:1 for normal text.
     2. .template-grids a:hover, .template-grids a:focus
          { color:#ddb563 } â 1.97:1 â link hover/focus is
        unreadable. Use darker gold #8a6b34 (~4.6:1) to keep
        the brand cue.
     3. Shared footer-disclosure opacity 0.6 â 0.85.
   ------------------------------------------------------------ */
/* SCOPE NOTE: two previous color overrides were removed from this
   block because both targeted brand colors that vary per property:

   (a) `.template-grids .FloorPlansV3 a { color: #595959 }` was
   replacing the floor-plans link color. Verified across 4 Greystar
   Grids properties — every property has a different FloorPlansV3
   link color (highbridge #6f8490, thejuneapts #212721,
   lindenhighlands #292421, lumenabq #477a7b). 3 of 4 already passed
   4.5:1 contrast; only highbridge's #6f8490 (~3.7:1) fails. Forcing
   gray on every property strips brand without fixing anything for
   the 3 that already passed.

   (b) Inline-link :hover/:focus color to #8a6b34 (dark brown),
   claiming it fixed `.template-grids a:hover { color:#ddb563 }`
   ≈ 1.97:1 on white. The base hover color is per-property
   (highbridge #5890b0, thejuneapts #d1ccbd, etc.). #8a6b34 isn't
   in any property's brand palette and could make hover text
   unreadable on dark-branded properties.
   Brand-color contrast failures must be fixed at the property level,
   not in shared template injection. See per-property-base-css memory.
   Also: the bare `p a:hover` / `li a:hover` selectors would bleed
   into nav/footer (same Balcony bug). Block removed entirely. */

.footer-widget footer .footer-disclosure {
  opacity: 0.85;
}


/* ------------------------------------------------------------
   WCAG 1.4.1 Use of Color (inline links)
   ------------------------------------------------------------ */
.template-grids .container-fluid.main a,
.template-grids .col-sm-12.content a,
.template-grids .main-content-text a,
.template-grids .inner-page-main-content a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.template-grids a.btn,
.template-grids a.button,
.template-grids .btn,
.template-grids .btn-primary,
.template-grids .top-bar a,
.template-grids .navbar-grids a,
.template-grids .cta-header-btn,
.template-grids .header-CTA-button,
.template-grids .footer-CTA-Button,
.template-grids a.more-link,
.template-grids a.less-link,
.template-grids .floorplan-search-bar a,
.template-grids .contact-widget .sumbitbutton input,
.footer-widget footer a {
  text-decoration: none;
}

/* ------------------------------------------------------------
   TFS 2870264 — WCAG 1.4.1 (homepage inline links)
   Grids' homepage uses `.special-home-message` for the
   welcome blurb (same wrapper used by Dakota/Elan/Emerald/
   Slate Phase 1 fixes). Verified against averydallas.com
   (4 inline links inside `.special-home-message`).
   ------------------------------------------------------------ */
.template-grids .special-home-message a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.template-grids .special-home-message a.btn,
.template-grids .special-home-message a.button,
.template-grids .special-home-message a.more-btn,
.template-grids .special-home-message .more-btn {
  text-decoration: none;
}


/* ------------------------------------------------------------
   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;
}

/* ------------------------------------------------------------
   TFS 2905631 - WCAG 1.4.11 Non-text Contrast (form controls)
   The full-width Neighborhood search input has no perceivable
   resting border: base CSS (rpWebpartCss_NeighborhoodFullWidth.css)
   sets `border:none; background:none; color:#fff` on a dark
   rgba(0,0,0,.83) search overlay. Add a light 1px boundary at
   #cfcfcf (~9.6:1 on that dark surface; matches the widget's
   existing placeholder color). All 21 priority templates use this
   dark default - none override it to a light surface.
   ------------------------------------------------------------ */
body #form .neighborhood-widget .neighborhood-widget__search .form-group .form-control {
  border: 1px solid #cfcfcf;
}

/* ------------------------------------------------------------
   TFS 2987209 — WCAG 2.2 AAA 2.5.5 Target Size (Enhanced):
   grow the hamburger (.navbar-toggle) to a 44×44 hit area.

   RPcssMaster_S0069-GS-Grids.css shows/positions this button only
   inside @media(max-width:1200px) (`.navbar-toggle{display:block}`).
   Mirrored here at the SAME breakpoint, NOT unconditional — an
   earlier, unconditional version of this rule left the toggle an
   invisible-but-still-hit-testable 44×44 control past 1200px (the
   `.icon-bar` spans compute fully transparent there, yet the
   element was still clickable) — a phantom interactive target,
   confirmed live on TFS 2987209. Do not drop the media query.

   Icon is Bootstrap's stacked-`.icon-bar`-span construction (3
   bars); `flex-direction:column` is required or the bars re-lay
   into a horizontal row and visually collide with the site logo
   (confirmed live on an earlier, uncorrected pass of this fix).
   `!important` on `display` only, for cascade-order robustness —
   sizing never needs it. Confirmed live at 375/768: 44×44, glyph
   intact, no logo overlap, skip-link unaffected. Toggle does not
   render at 1440 — correctly still hidden, unchanged.
   ------------------------------------------------------------ */
@media (max-width: 1200px) {
  .template-grids .navbar-toggle {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
  }
}

/* ------------------------------------------------------------
   TFS 2982346 - WCAG 2.2 AA 2.5.8 Target Size (Pointer): footer links

   Live-measured on grids080123.sat-ws.realpage.com/Contact.aspx at 1280x900
   (headless Chrome, border-box heights): 3 footer target(s) under 24x24.

     footer .footer-property-logo a                 72 x 16, display:inline, wraps an <img>
     footer .footer-phone-content a.footer-phone    99.2 x 19, display:inline
     footer .footer-address-content a               150.9 x 18, display:BLOCK ("Directions")

   These are display:inline, where `line-height` cannot help - it does not
   change an inline element's border-box height. inline-block is what makes
   min-height apply. No padding and no negative-margin cancel is used: each
   target sits in a line box already at or above 24px, so the box grows into
   existing leading. Verified by injecting these rules into the live SAT page:
   0 targets remaining, no horizontal overflow, and document height +8px - the
   only layout movement in this ticket, and it is the "Directions" link: it is
   display:block at 18px, so raising it to 24px genuinely adds height rather
   than consuming leading. Left uncancelled deliberately - a negative margin
   would buy 8px on a footer at the cost of pulling a block-level link's hit
   area toward its neighbour.

   SCOPE PREFIX: scoped on the `footer` element. On THIS template
   `.footer-widget footer` also matches, so either prefix would work - the bare
   `footer` is used for consistency across the 18 template files in this ticket,
   three of which genuinely need it (Zen-Garden and Au-Courant nest
   `footer > .footer-widget`, reversed; Jackson-Square has no `.footer-widget`
   element at all). `footer` is a superset of both nestings. Verified against
   the live SAT DOM per template - not assumed.
   ------------------------------------------------------------ */

footer .footer-property-logo a {
    display: inline-block;
    min-height: 24px;
}

footer .footer-phone-content a.footer-phone {
    display: inline-block;
    min-height: 24px;
}

/* display:block already - min-height alone grows it, no inline-block needed. */
footer .footer-address-content a {
    min-height: 24px;
}
