/**
 * Astra Bleed Resets
 *
 * Astra's inline dynamic CSS (`astra-theme-css-inline-css`) targets bare
 * elements (a, button, input, etc.) with no class, so its rules bleed into
 * EPSD zones even after `astra-theme-css` is dequeued — wp_dequeue_style()
 * drops the file but WordPress still prints wp_add_inline_style() blobs
 * attached to the handle.
 *
 * These scoped overrides restore EPSD token values inside zone wrappers
 * (.epsd-nav-wrap, .epsd-drawer, .epsd-zone-8). They intentionally do NOT
 * reset Astra styles in page content areas (sidebar, entry-content) where
 * Astra's base styles are still wanted.
 *
 * Decision pattern when a new bleed surfaces:
 *  - EPSD class is on the *anchor itself* → add it to the :not() exclusion below.
 *  - EPSD class is on a *parent/list* → scope-bump the rule in the zone CSS
 *    (e.g. `.epsd-drawer .epsd-drawer__quicklinks a`) so it ties on
 *    specificity and wins on source order (zone-N.css loads after this file).
 *
 * Always pair plain `:focus` with `:focus-visible` to neutralize click-focus
 * without adding a focus ring on click.
 *
 * Current exclusions: .epsd-nav__link, .epsd-drawer__nav-link, .epsd-zone-1b__dropdown-link
 */

/* Astra bleed reset for links — exclude .epsd-nav__link and .epsd-drawer__nav-link
   which have their own color rules (and aria-current state) in zone-2.css.
   The drawer is a sibling of .epsd-nav-wrap (rendered outside the header), so
   it needs its own scope. */
.epsd-nav-wrap a:not(.epsd-nav__link),
.epsd-drawer a:not(.epsd-drawer__nav-link),
.epsd-zone-8 a {
	color: var(--epsd-text-link);
}

.epsd-nav-wrap a:not(.epsd-nav__link):hover,
.epsd-nav-wrap a:not(.epsd-nav__link):focus,
.epsd-drawer a:not(.epsd-drawer__nav-link):hover,
.epsd-drawer a:not(.epsd-drawer__nav-link):focus,
.epsd-zone-8 a:hover,
.epsd-zone-8 a:focus {
	color: var(--epsd-text-link-hover);
}

/* Zone 1b utility bar — dark green background, white links, gold hover.
   Astra's inline `a:hover, a:focus { color: #1567a6 }` would otherwise paint
   the home icon (and any other bare anchor) blue inside the bar.

   Excludes .epsd-zone-1b__dropdown-link — the staff-portal dropdown panel
   has a white background and uses --epsd-text-primary for its links. */
.epsd-zone-1b a:not(.epsd-zone-1b__dropdown-link) {
	color: var(--epsd-text-inverse);
}

.epsd-zone-1b a:not(.epsd-zone-1b__dropdown-link):hover,
.epsd-zone-1b a:not(.epsd-zone-1b__dropdown-link):focus,
.epsd-zone-1b a:not(.epsd-zone-1b__dropdown-link):focus-visible {
	color: var(--epsd-color-gold-400);
}

/* Header social icons — the bleed reset above paints `.epsd-nav__social a`
   dark green via currentColor, which the SVG `fill: currentColor` inherits,
   turning icons dark green on a near-black chip (see references/socials.png).
   Re-assert the intended white/hover colors at higher specificity. */
.epsd-nav-wrap .epsd-nav__social a {
	color: var(--epsd-color-white, #fff);
}

.epsd-nav-wrap .epsd-nav__social a:hover,
.epsd-nav-wrap .epsd-nav__social a:focus,
.epsd-nav-wrap .epsd-nav__social a:focus-visible {
	color: var(--epsd-color-white, #fff);
}

/* Astra bleed reset for buttons — exclude .epsd-nav__link which has its own
   complete styling in zone-2.css (font-family, size, weight, padding, etc.).
   The drawer's nav toggles/close button need their own scope since the drawer
   is rendered outside .epsd-nav-wrap. Drawer buttons keep their own padding /
   sizing from zone-2.css, so this reset only neutralizes Astra's color/bg/border. */
.epsd-nav-wrap button:not(.epsd-nav__link),
.epsd-zone-8 button {
	font-family: var(--epsd-font-sans);
	background-color: transparent;
	color: inherit;
	border: none;
	padding: 0;
	font-size: inherit;
	line-height: inherit;
	font-weight: inherit;
	cursor: pointer;
}

.epsd-drawer button {
	font-family: var(--epsd-font-sans);
	color: inherit;
	cursor: pointer;
}

.epsd-nav-wrap button:not(.epsd-nav__link):hover,
.epsd-nav-wrap button:not(.epsd-nav__link):focus,
.epsd-nav-wrap input[type="button"]:hover,
.epsd-nav-wrap input[type="button"]:focus,
.epsd-nav-wrap input[type="submit"]:hover,
.epsd-nav-wrap input[type="submit"]:focus,
.epsd-nav-wrap input[type="reset"]:hover,
.epsd-nav-wrap input[type="reset"]:focus,
.epsd-drawer button:hover,
.epsd-drawer button:focus,
.epsd-zone-8 button:hover,
.epsd-zone-8 button:focus,
.epsd-zone-8 input[type="button"]:hover,
.epsd-zone-8 input[type="button"]:focus,
.epsd-zone-8 input[type="submit"]:hover,
.epsd-zone-8 input[type="submit"]:focus,
.epsd-zone-8 input[type="reset"]:hover,
.epsd-zone-8 input[type="reset"]:focus {
	color: inherit;
	background-color: transparent;
	border-color: transparent;
}

.epsd-nav-wrap input,
.epsd-nav-wrap select,
.epsd-nav-wrap textarea,
.epsd-zone-8 input,
.epsd-zone-8 select,
.epsd-zone-8 textarea {
	font-family: var(--epsd-font-sans);
	font-size: inherit;
}

.epsd-nav-wrap input:focus,
.epsd-nav-wrap input[type="text"]:focus,
.epsd-nav-wrap input[type="email"]:focus,
.epsd-nav-wrap input[type="search"]:focus,
.epsd-nav-wrap textarea:focus,
.epsd-zone-8 input:focus,
.epsd-zone-8 input[type="text"]:focus,
.epsd-zone-8 input[type="email"]:focus,
.epsd-zone-8 textarea:focus {
	border-color: var(--epsd-focus-ring-color);
	outline: var(--epsd-focus-ring);
}
