/* Lake Accessibility: automatic CSS fixes.
 * Every rule is gated by a lake-fix-* class on <html> so each fix can be
 * switched off in Settings → Lake Accessibility → Automatic fixes. */

/* Screen-reader-only text ------------------------------------------------ */
.lake-a11y-sr {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	margin: -1px !important;
	padding: 0 !important;
	overflow: hidden !important;
	clip: rect(0 0 0 0) !important;
	clip-path: inset(50%) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

/* Skip links (WCAG 2.4.1) ---------------------------------------------- */
.lake-a11y-skip-links {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 2147483646;
}
.lake-a11y-skip-links .lake-a11y-skip {
	position: absolute;
	left: -10000px;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
	margin: 0;
	border: 0;
	cursor: pointer;
}
.lake-a11y-skip-links .lake-a11y-skip:focus {
	position: fixed;
	left: 16px;
	top: 16px;
	width: auto;
	height: auto;
	overflow: visible;
	z-index: 2147483647;
	padding: 12px 20px;
	background: #111 !important;
	color: #fff !important;
	font: 600 16px/1.3 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif !important;
	text-decoration: underline !important;
	border-radius: 6px;
	outline: 3px solid #fff !important;
	box-shadow: 0 0 0 6px #111 !important;
}
/* The main region receives programmatic focus from the skip link; no ring needed. */
[id="lake-a11y-main"]:focus,
main[tabindex="-1"]:focus,
[role="main"][tabindex="-1"]:focus {
	outline: none !important;
}

/* Visible keyboard focus (WCAG 2.4.7 / 2.4.13) -------------------------- */
html.lake-fix-focus :is(a[href], button, input, select, textarea, summary, iframe, [tabindex]:not([tabindex="-1"]), [role="button"], [role="link"], [role="tab"], [role="menuitem"], [role="switch"], [role="checkbox"], [contenteditable="true"]):focus-visible {
	outline: 3px solid #1a5fb4 !important;
	outline-offset: 2px !important;
	box-shadow: 0 0 0 5px #fff !important;
	border-radius: 2px;
}

/* Links inside running text are underlined (WCAG 1.4.1) ----------------- */
html.lake-fix-underline :is(p, td, dd, blockquote, figcaption, address, .recaptcha-disclaimer, .gfield_description, .entry-content li, .et_pb_text_inner li, .wp-block-list li) a[href]:not([class*="button"]):not([class*="btn"]):not([role="button"]) {
	text-decoration-line: underline !important;
	text-underline-offset: 0.15em;
	text-decoration-thickness: from-font;
}

/* Respect "reduce motion" system setting (WCAG 2.3.3) ------------------- */
@media (prefers-reduced-motion: reduce) {
	html.lake-fix-motion *,
	html.lake-fix-motion *::before,
	html.lake-fix-motion *::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}
}

/* Dropdown menus open on keyboard focus (WCAG 2.1.1) -------------------- */
html.lake-fix-menus :is(.menu-item-has-children, .page_item_has_children, li.lake-a11y-open):focus-within > :is(ul, .sub-menu, .children) {
	visibility: visible !important;
	opacity: 1 !important;
}
html.lake-fix-menus #top-menu li:focus-within > ul.sub-menu,
html.lake-fix-menus .nav li:focus-within > ul {
	visibility: visible !important;
	opacity: 1 !important;
	z-index: 9999;
}
/* Divi mobile menu toggle made into a button */
html.lake-fix-menus .mobile_menu_bar[role="button"] {
	cursor: pointer;
}

/* Small slider dots get enough spacing to be hit reliably (WCAG 2.5.8) --- */
html.lake-fix-structure .swiper-pagination-bullets .swiper-pagination-bullet,
html.lake-fix-structure .slick-dots li,
html.lake-fix-structure .et-pb-controllers a {
	margin-left: 8px !important;
	margin-right: 8px !important;
}

/* Pause buttons for autoplaying motion (WCAG 2.2.2) --------------------- */
.lake-a11y-pause {
	position: absolute !important;
	z-index: 50;
	right: 12px;
	bottom: 12px;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 44px !important;
	height: 44px !important;
	min-width: 44px;
	margin: 0 !important;
	padding: 0 !important;
	border: 2px solid #fff !important;
	border-radius: 50% !important;
	background: rgba(17, 17, 17, 0.85) !important;
	color: #fff !important;
	cursor: pointer;
	line-height: 1 !important;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}
.lake-a11y-pause svg {
	width: 18px;
	height: 18px;
	fill: currentColor;
	pointer-events: none;
}
.lake-a11y-pause:focus-visible {
	outline: 3px solid #fff !important;
	outline-offset: 2px !important;
	box-shadow: 0 0 0 6px #1a5fb4 !important;
}
.lake-a11y-pause-host {
	position: relative;
}
