/* UNIT 365 accessibility hardening — WCAG 2.2 AA target. */

/* Keep keyboard focus visible even when older component styles remove it. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid #1769e0 !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 2px #fff !important;
}

.skip-link,
.a11y-skip-link {
  position: fixed !important;
  top: 8px !important;
  left: 8px !important;
  z-index: 2147483647 !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  padding: 12px 16px !important;
  overflow: visible !important;
  clip: auto !important;
  clip-path: none !important;
  transform: translateY(-160%);
  border: 2px solid #fff !important;
  background: #111 !important;
  color: #fff !important;
  font: 700 14px/1.2 Arial, sans-serif !important;
  letter-spacing: 0 !important;
  text-decoration: none !important;
  transition: transform 120ms ease !important;
}

.skip-link:focus,
.a11y-skip-link:focus {
  transform: translateY(0);
}

/* WCAG 2.2 minimum pointer target for standalone controls. */
:where(button, [role="button"], input[type="checkbox"], input[type="radio"]) {
  min-width: 24px;
  min-height: 24px;
}

#collection .product-quick-toggle {
  width: 32px !important;
  height: 32px !important;
}

.gallery-btn,
.drawer-close,
.modal-close,
.mini,
.line-remove,
.qty button,
.cart-upsell-card__add,
.cart-upsell-size {
  min-width: 44px !important;
  min-height: 44px !important;
}

/* Helper copy must remain readable at its intentionally small type size. */
.finance-note,
.secure-line,
.buy-assurance,
.pdp-footer a,
.why-foundation-reference {
  color: #5f6670 !important;
}

/* Do not expose closed drawers or modals to keyboard/screen-reader navigation. */
[inert] {
  pointer-events: none !important;
}

/* Text links inside prose must not rely on color alone. */
:where(.legal-body, .policy-body, .modal-consent, .offer-sub, .footer-consent, .footer-sms-disclosure) a {
  text-decoration: underline !important;
  text-underline-offset: .16em;
  text-decoration-thickness: max(1px, .08em);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }

  .community-track,
  .marquee-track,
  [class*="marquee"] {
    animation: none !important;
    transform: none !important;
  }
}

@media (forced-colors: active) {
  :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 3px solid Highlight !important;
    box-shadow: none !important;
  }

  .cart-shipping__fill,
  .size-btn.is-active,
  .color-tile.is-active,
  .opt-btn.is-active {
    forced-color-adjust: none;
    border: 2px solid Highlight !important;
  }
}
