/**
 * TEP 2026: site-wide accessibility fixes (audit docs/audit/accessibility.md, A11Y-n ids).
 *
 * Loads after the bb-theme skin and before the tep-* component sheets (see class-tep-a11y.php),
 * so the plain `a` rules below only replace the skin's default accent; everything else uses
 * selectors specific enough (or !important for focus rings) to win regardless of order.
 * Design-system tokens are not redefined here.
 */

/* ---------- Links: no bb-theme default accent (#2B7BB9) in content (A11Y-9) ----------
   #2B7BB9 on #F0F0F0 is 3.97:1. Bare links fall back to the DS text color, underlined on hover/focus. */
a,
a:focus {
	color: var(--ds-color-text);
}

a:hover {
	color: var(--ds-color-text);
	text-decoration: underline;
}

.tep-form-placeholder a,
.tep-lcard a {
	color: var(--ds-color-black);
	text-decoration: underline;
}

/* ---------- Focus visibility (A11Y-3, A11Y-4, A11Y-5) ----------
   The DS sets :focus-visible { outline: 2px solid secondary; offset 2px }, but the skin's
   `button:focus { outline: none }` and PowerPack's `outline: none` on Info Box icon links beat it. */
html body button:focus-visible,
html body input[type="submit"]:focus-visible,
html body [role="button"]:focus-visible,
html body .pp-infobox-image a:focus-visible,
html body .pp-infobox a:focus-visible,
html body .pp-share-button-link:focus-visible,
html body .owl-carousel:focus-visible,
html body .owl-nav button:focus-visible,
html body .pp-swiper-button:focus-visible,
html body .fl-menu-mobile-toggle:focus-visible,
html body .fl-menu-toggle:focus-visible {
	outline: 2px solid var(--ds-color-secondary) !important;
	outline-offset: 2px !important;
	box-shadow: none;
}

/* Skin: `button:focus { background: #2B7BB9 }` turned DS buttons blue after a click. */
html body button.bb-btn:focus {
	background: var(--ds-color-primary-dark);
	border-color: var(--ds-color-primary-dark);
	color: var(--ds-color-surface);
}

/* Info Box icon links: room for the ring (A11Y-3). */
.pp-infobox-image a {
	display: inline-block;
}

html body .pp-infobox-image a:focus-visible {
	outline-offset: 4px !important;
}

/* Share buttons: the wrapper clipped the ring (A11Y-4). */
.pp-social-share-content,
.pp-social-share-inner,
.pp-share-grid-item,
.pp-share-button {
	overflow: visible !important;
}

/* Carousels (A11Y-5): the focusable Owl stage gets a ring with room to show inside the row's
   overflow:hidden; the arrows ring sits off the red fill so it isn't lost against white. */
html body .tep-values .owl-carousel:focus-visible {
	outline-offset: 4px !important;
}

html body .tep-values .owl-nav button:focus-visible,
html body .tep-photo-carousel .pp-swiper-button:focus-visible {
	outline-offset: 3px !important;
}

/* Dark backgrounds: the #0671B3 ring is about 4:1 on black (passes 3:1 for 2.4.11/1.4.11), so it is
   kept everywhere for consistency; add class "tep-on-dark" to a row to switch its rings to white. */
html body .tep-on-dark :focus-visible {
	outline-color: var(--ds-color-surface) !important;
}

/* ---------- Placeholders (A11Y-7) ----------
   DS muted #999 is 2.5:1 on #F0F0F0. #595959 is 6.1:1 on #F0F0F0 and 6.3:1 on white. */
html body .bb-field::placeholder,
html body .tep-filters input::placeholder,
html body .tep-gform_wrapper input::placeholder,
html body .tep-gform_wrapper textarea::placeholder {
	color: #595959;
	opacity: 1;
}

/* ---------- Red text under 24px uses primary-dark #C80006 (A11Y-10, decisions.md) ----------
   #E32428 is 4.62:1 on white only (4.05:1 on #F0F0F0, ~4.4:1 on the footer background).
   #C80006 is 6.1:1 on white. Buttons, fills and text at 24px+ keep #E32428. */
html body .tep-eyebrow p,
html body .tep-card__eyebrow,
html body .tep-event-meta__sep,
html body .tep-ncard__meta .tep-event-meta__sep,
html body .tep-post-card__sep,
html body .tep-values .pp-testimonials-designation,
html body .tep-eeo.fl-rich-text a,
html body .tep-jobboard__fallback a,
html body .tep-hero-lead.fl-rich-text a,
html body .tep-general-title.fl-heading,
html body .tep-general-title .fl-heading,
html body .tep-general-info.fl-rich-text a:hover,
html body .tep-general-info.fl-rich-text a:focus-visible,
html body .tep-lcard a:hover,
html body .tep-lcard a:focus-visible,
html body .tep-subsvc-card a.pp-more-link,
html body .tep-sidebar-list a:hover,
html body .tep-region__opt.is-active,
html body .bb-eyebrow,
html body .fl-node-w12fqjl7t8ia.fl-heading,
html body .fl-node-w12fqjl7t8ia .fl-heading-text,
html body .fl-node-z7sdh63t4v0a.fl-heading,
html body .fl-node-z7sdh63t4v0a .fl-heading-text,
html body .fl-node-l6x8h3syfmg0 p {
	color: var(--ds-color-primary-dark);
}

/* Colors set in module settings print node CSS like `.fl-row .fl-col h2.fl-node-…` (0,3,1), so these need !important. */
html body .fl-node-w12fqjl7t8ia,
html body .fl-node-z7sdh63t4v0a,
html body .fl-node-53k9174hmfws .tep-region__opt.is-active,
html body .fl-node-l6x8h3syfmg0.fl-rich-text,
html body .fl-node-l6x8h3syfmg0.fl-rich-text *,
html body .tep-post-card__sep {
	color: var(--ds-color-primary-dark) !important;
}

/* Current menu item / hover in the header and footer menus (16-20px red text). */
html body .fl-module-menu .menu > li.current-menu-item > a,
html body .fl-module-menu .menu > li.current-menu-ancestor > a,
html body .fl-module-menu .menu > li.current-menu-parent > a,
html body .fl-module-menu .sub-menu li.current-menu-item > a,
html body .fl-module-menu .menu li > a:hover,
html body .fl-module-menu .menu li > a:focus-visible,
html body .fl-module-menu .menu li.current-menu-ancestor > .fl-has-submenu-container > a,
html body .fl-module-menu .menu li.current-menu-item > .fl-has-submenu-container > a {
	color: var(--ds-color-primary-dark);
}

/* ---------- Small project cards: title visible without hover (A11Y-12) ---------- */
@media (hover: none) {
	.tep-projcard--small::before,
	.tep-projcard--small .tep-projcard__title {
		opacity: 1;
		transform: none;
	}
}

.tep-projcard--small:focus-within::before,
.tep-projcard--small:focus-within .tep-projcard__title {
	opacity: 1;
	transform: none;
}

/* ---------- Posts module list fix (A11Y-14): <ul> wrapper replaced by div.tep-post-columns ---------- */
.tep-post-columns {
	display: contents;
}

/* ---------- Reduced motion (A11Y-24) ---------- */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		scroll-behavior: auto !important;
	}
}
