/* AGEERA accessibility overrides. Change log: a11y/CHANGES.md (ageera-docker repo).
   Brand mapping (approved: keep hue, smallest change):
     orange buttons #FC7C04/#FE8105/#FF8800 + white text  -> text #201000 (7.1:1+; was navy, changed on request)
     orange button hover #E57000                          -> text #201000 (5.9:1)
     orange text on white                                 -> #BB5C02 (4.52:1)
     grey body text #7A7A7A                               -> #717171 (4.56:1 on #F7F7F7)
*/

/* ---------- Visible keyboard focus (WCAG 2.4.7) ---------- */
/* Navy ring + white halo: visible on light sections and on the dark header/hero alike.
   !important because theme/plugin focus rules (black or white outlines) load later. */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, summary:focus-visible, [tabindex]:not([tabindex="-1"]):focus-visible {
	outline: 2px solid #183158 !important;
	outline-offset: 2px !important;
	box-shadow: 0 0 0 4px #ffffff !important;
}
main#content:focus { outline: none; }

/* Skip link: visible when focused (Hello's .screen-reader-text hides it otherwise). */
.skip-link.screen-reader-text:focus {
	z-index: 100000;
	inset-inline-start: 8px;
	top: 8px;
	padding: 12px 16px;
	background: #ffffff;
	color: #183158;
	font-weight: 700;
	text-decoration: underline;
}

/* ---------- Polylang language switcher: 24x24 targets (target-size, WCAG 2.5.8) ---------- */
.cpel-switcher__lang > a {
	display: inline-flex;
	align-items: center;
	min-height: 24px;
	min-width: 24px;
}

/* ---------- OneTrust / CookiePro banner contrast (third-party markup) ---------- */
#onetrust-consent-sdk #onetrust-banner-sdk #onetrust-policy-text a,
#onetrust-consent-sdk #onetrust-banner-sdk a.ot-cookie-policy-link,
#onetrust-consent-sdk #onetrust-pc-sdk a {
	color: #bb5c02 !important;
	text-decoration: underline !important;
}
#onetrust-consent-sdk #onetrust-accept-btn-handler,
#onetrust-consent-sdk #onetrust-reject-all-handler,
#onetrust-consent-sdk #onetrust-pc-sdk .save-preference-btn-handler,
#onetrust-consent-sdk #onetrust-pc-sdk #accept-recommended-btn-handler,
#onetrust-consent-sdk #onetrust-pc-sdk .ot-pc-refuse-all-handler,
#onetrust-consent-sdk #onetrust-pc-sdk #filter-apply-handler,
#onetrust-consent-sdk #onetrust-pc-sdk #filter-cancel-handler {
	color: #201000 !important;
}
#onetrust-consent-sdk #onetrust-pc-btn-handler,
#onetrust-consent-sdk #onetrust-pc-btn-handler.cookie-setting-link {
	color: #bb5c02 !important;
	border-color: #bb5c02 !important;
}

/* ---------- Links inside running text: underline (link-in-text-block, WCAG 1.4.1) ---------- */
.elementor-widget-text-editor a:not(.elementor-button),
.elementor-widget-theme-post-content a:not(.elementor-button),
.elementor-widget-text-editor a:not(.elementor-button):visited {
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* ---------- Headings re-leveled for heading-order keep their original size ---------- */
/* Hello Elementor defaults: h3 1.75rem, h4 1.5rem, h5 1.25rem, h6 1rem. */
.a11y-h3 { font-size: 1.75rem; }
.a11y-h4 { font-size: 1.5rem; }
.a11y-h5 { font-size: 1.25rem; }
.a11y-h6 { font-size: 1rem; }

/* ---------- Breadcrumb links (Yoast / Elementor Breadcrumbs): underline, not color only
   (link-in-text-block, WCAG 1.4.1) ---------- */
#breadcrumbs a,
.elementor-widget-breadcrumbs a {
	text-decoration: underline;
	text-underline-offset: 2px;
}
/* Breadcrumb links that still use the global "links & buttons" orange #FE8105 (2.5:1 on white):
   redefine that global only inside breadcrumbs, so those links get the same deeper orange as the
   other breadcrumbs, #B05602 (5.0:1 on white, 4.7:1 on #F8F8F8). Breadcrumbs with any other color
   (e.g. grey) are untouched. axe/Lighthouse missed these (white box over a background image). (WCAG 1.4.3) */
.elementor-widget-breadcrumbs { --e-global-color-a56f822: #b05602; }

/* ---------- Text over video / transparent header: real fallback backgrounds (WCAG 1.4.3) ----------
   WAVE (and any color-based checker) can't see a background video, so white text over it is
   measured against the white page. These give that text a real dark backdrop:
   - containers with an Elementor background video get black behind the video (hidden while the
     video plays, keeps text readable if it fails to load);
   - the transparent header (before it turns sticky/white) gets a light dark-to-clear scrim, so the
     menu stays readable on any video frame. */
.e-con:has(> .elementor-background-video-container),
.e-con:has(> .e-con-inner > .elementor-background-video-container),
.elementor-section:has(> .elementor-background-video-container) {
	background-color: #000000 !important;
}
.siteheader:not(.elementor-sticky--effects) {
	background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0));
}

/* Floating social tooltip: fully hidden until hover/focus (it was only opacity:0, which reads as
   invisible text to contrast checkers). The link keeps its aria-label. */
.ageera-floating-social a.afs-btn .afs-tooltip { visibility: hidden; }
.ageera-floating-social a.afs-btn:hover .afs-tooltip,
.ageera-floating-social a.afs-btn:focus .afs-tooltip,
.ageera-floating-social a.afs-btn:focus-visible .afs-tooltip,
.ageera-floating-social a.afs-btn:active .afs-tooltip { visibility: visible; }

/* Enable accessibility toolbar (third-party, DE site): its own CSS hides the keyboard-shortcut hints
   permanently with opacity:0 !important, which contrast checkers read as invisible text (1:1).
   Hide them with visibility too; nothing visible changes. (WCAG 1.4.3 false positive) */
#enable-toolbar .keyboard-shorcut { visibility: hidden !important; }
