/**
 * WCAG 2.5.8 Touch Target Size Compliance
 * Minimum: 45x45px (44px spec + 1px safety margin)
 *
 * This file overrides courtyard-artifact and Claro base theme styles
 * to ensure all interactive elements meet the touch target minimum.
 * Loaded with high weight to override third-party CSS.
 */

/* ============================================================================
   PAGINATION / PAGER
   ============================================================================ */

/* Courtyard pager links - were 32x32px */
.jcc-pager__item a,
.jcc-pager__item.is-active a,
.jcc-pager__item span {
  min-height: 45px;
  min-width: 45px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

/* ============================================================================
   GLOBAL BAR NAVIGATION
   ============================================================================ */

/* Global bar nav links - were ~31px tall */
.jcc-global-bar__nav-item a {
  min-height: 45px;
  display: inline-flex;
  align-items: center;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

/* Global bar logo link */
.jcc-global-bar__logo a {
  min-height: 45px;
  display: inline-flex;
  align-items: center;
}

/* ============================================================================
   HEADER NAVIGATION
   ============================================================================ */

/* Secondary nav items (utility links above main nav) - were ~20px tall */
.usa-nav__secondary-item a {
  min-height: 45px;
  display: inline-flex;
  align-items: center;
  padding: 0.5rem;
}

/* Submenu dropdown links - were ~19px tall */
.usa-nav__submenu-item a {
  min-height: 45px;
  display: flex;
  align-items: center;
  padding-top: 0.625rem;
  padding-bottom: 0.625rem;
}

/* Primary nav links */
.usa-nav__primary-item > a,
.usa-nav__primary-item > button {
  min-height: 45px;
}

/* ============================================================================
   BREADCRUMBS
   ============================================================================ */

.usa-breadcrumb__link {
  min-height: 45px;
  display: inline-flex;
  align-items: center;
}



/* ============================================================================
   FOOTER LINKS
   ============================================================================ */

.usa-footer__secondary-link a {
  min-height: 45px;
  display: inline-flex;
  align-items: center;
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

.usa-footer__primary-link {
  min-height: 45px;
  display: flex;
  align-items: center;
}

/* ============================================================================
   INLINE BODY TEXT LINKS
   Expand touch target using ::after pseudo-element to avoid layout changes
   ============================================================================ */

.usa-prose a:not([class*="jcc-button"]):not([class*="usa-button"]):not(.usa-breadcrumb__link):not(.usa-footer__secondary-link):not(.usa-nav__link):not(.file):not(.ext):not(.extlink):not([href^="mailto:"]):not([href^="tel:"]),
.jcc-body a:not([class*="jcc-button"]):not([class*="usa-button"]):not(.file):not(.ext):not(.extlink):not([href^="mailto:"]):not([href^="tel:"]),
.field--type-text-long a:not([class*="jcc-button"]):not([class*="usa-button"]):not(.file):not(.ext):not(.extlink):not([href^="mailto:"]):not([href^="tel:"]),
.text-formatted a:not([class*="jcc-button"]):not([class*="usa-button"]):not(.file):not(.ext):not(.extlink):not([href^="mailto:"]):not([href^="tel:"]) {
  position: relative;
}

.usa-prose a:not([class*="jcc-button"]):not([class*="usa-button"]):not(.usa-breadcrumb__link):not(.usa-footer__secondary-link):not(.usa-nav__link):not(.file):not(.ext):not(.extlink):not([href^="mailto:"]):not([href^="tel:"])::after,
.jcc-body a:not([class*="jcc-button"]):not([class*="usa-button"]):not(.file):not(.ext):not(.extlink):not([href^="mailto:"]):not([href^="tel:"])::after,
.field--type-text-long a:not([class*="jcc-button"]):not([class*="usa-button"]):not(.file):not(.ext):not(.extlink):not([href^="mailto:"]):not([href^="tel:"])::after,
.text-formatted a:not([class*="jcc-button"]):not([class*="usa-button"]):not(.file):not(.ext):not(.extlink):not([href^="mailto:"]):not([href^="tel:"])::after {
  content: "";
  position: absolute;
  top: 50%;
  left: -2px;
  right: -2px;
  transform: translateY(-50%);
  min-height: 45px;
  pointer-events: auto;
}

/* File and external links: use padding instead of ::after for touch target
   since these links already use ::after for their icon */
.usa-prose a.file,
.usa-prose a.ext,
.usa-prose a.extlink,
.jcc-body a.file,
.jcc-body a.ext,
.jcc-body a.extlink,
.field--type-text-long a.file,
.field--type-text-long a.ext,
.field--type-text-long a.extlink,
.text-formatted a.file,
.text-formatted a.ext,
.text-formatted a.extlink,
.usa-prose a[href^="mailto:"],
.usa-prose a[href^="tel:"],
.jcc-body a[href^="mailto:"],
.jcc-body a[href^="tel:"],
.field--type-text-long a[href^="mailto:"],
.field--type-text-long a[href^="tel:"],
.text-formatted a[href^="mailto:"],
.text-formatted a[href^="tel:"] {
  display: inline-flex;
  align-items: center;
  min-height: 45px;
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

/* ============================================================================
   SEARCH INPUT / BUTTON (mobile default was 32px)
   ============================================================================ */

.usa-search__input,
.usa-search__submit {
  min-height: 45px;
}

/* ============================================================================
   CTA LINK BUTTONS
   ============================================================================ */

.jcc-button--cta-link {
  min-height: 45px;
  display: inline-flex;
  align-items: center;
}

/* ============================================================================
   ACCORDION BUTTONS
   ============================================================================ */

.usa-accordion__button {
  min-height: 45px;
}

/* ============================================================================
   CARD LINKS
   ============================================================================ */

.usa-card__heading a {
  min-height: 45px;
  display: inline-flex;
  align-items: center;
}

/* ============================================================================
   SEARCH RESULTS PAGE
   ============================================================================ */

.search-results a {
  position: relative;
}

.search-results a::after {
  content: "";
  position: absolute;
  top: 50%;
  left: -2px;
  right: -2px;
  transform: translateY(-50%);
  min-height: 45px;
  pointer-events: auto;
}

/* ============================================================================
   SKIP LINKS
   ============================================================================ */

.usa-skipnav,
.skip-to-results:focus {
  min-height: 45px;
  min-width: 45px;
  display: inline-flex;
  align-items: center;
}
