/* Accessibility overrides — added 2026-08-17.
   Loaded last so it wins over critical.css / styles.css / late.css.
   Delete this file and its enqueue in inc/resources.php to revert. */

:root {
  /* --para was #6a6c6d, which lands at 4.43:1 on the #fde6e7 "about stats" panels —
     just under the 4.5:1 WCAG AA floor. #656767 lifts it to 4.78:1 and is
     visually indistinguishable from the original grey. */
  --para: #656767;
}

/* Destination card title links rendered at only 19.6px tall. WCAG 2.2 AA (target-size)
   requires a 24px minimum. inline-flex + min-height grows the hit area without
   changing the text size or the card layout. */
.destination-list-card .gallery-title a.text-20 {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
}

/* ---------------------------------------------------------------------------
   WCAG AA contrast for the brand orange (--secondary: #f48801).
   #f48801 only reaches 2.51:1 against white, both as a button background with
   white text and as text on a white background.

   Approach chosen 2026-08-17: keep the brand orange EXACTLY as-is wherever it is
   a large filled area, and fix the foreground instead.
     - white text on orange  ->  near-black text   (6.94:1)
     - orange text on white  ->  darkened #ad5f00  (4.76:1)
   --------------------------------------------------------------------------- */

:root {
  /* Darkened orange, for use as a FOREGROUND colour on light backgrounds only.
     Never use this as a background — the fill colour stays #f48801. */
  --secondary-text: #ad5f00;
}

/* Any element that combines the orange fill with white text (e.g. the
   "trekker-btn bg-secondary text-white" CTA). Two classes out-specifies the
   .text-white utility, and !important is needed because that utility uses it. */
.bg-secondary.text-white,
.bg-secondary.text-white:hover,
.bg-secondary.text-white:focus {
  color: #1a1a1a !important;
}

/* .trekker-btn sets color:#fff on hover independently of the utility classes. */
.trekker-btn.bg-secondary:hover {
  color: #1a1a1a !important;
}

/* Ajax Search Pro's search button — orange fill, white label, styles injected by
   the plugin's generated CSS rather than the theme. */
.promagnifier .asp_text_button,
.promagnifier:hover .asp_text_button {
  color: #1a1a1a !important;
}

/* Orange used as TEXT on white (e.g. p.text-secondary in the insights cards). */
.text-secondary,
.hover-text-secondary:hover {
  color: var(--secondary-text) !important;
}
