/*!
 * Lake Accessibility — visitor adjustments.
 * Every rule is keyed off a class (lake-a11y-<feature>) or attribute
 * (data-lake-a11y-<feature>="value") on <html>, set by the early <head>
 * script and by widget.js. The widget UI itself lives in a shadow root
 * outside <body>, so none of these rules reach it.
 */

/* ---------- Page zoom (content-scale) ---------- */
html[data-lake-a11y-content-scale="-2"] body { zoom: .8; }
html[data-lake-a11y-content-scale="-1"] body { zoom: .9; }
html[data-lake-a11y-content-scale="1"] body { zoom: 1.1; }
html[data-lake-a11y-content-scale="2"] body { zoom: 1.2; }
html[data-lake-a11y-content-scale="3"] body { zoom: 1.3; }
html[data-lake-a11y-content-scale="4"] body { zoom: 1.4; }
html[data-lake-a11y-content-scale="5"] body { zoom: 1.5; }

/* ---------- Line, letter and word spacing ---------- */
html[data-lake-a11y-line-height="1"] body, html[data-lake-a11y-line-height="1"] body *:not(svg):not(svg *) { line-height: 1.5 !important; }
html[data-lake-a11y-line-height="2"] body, html[data-lake-a11y-line-height="2"] body *:not(svg):not(svg *) { line-height: 1.75 !important; }
html[data-lake-a11y-line-height="3"] body, html[data-lake-a11y-line-height="3"] body *:not(svg):not(svg *) { line-height: 2 !important; }
html[data-lake-a11y-line-height="4"] body, html[data-lake-a11y-line-height="4"] body *:not(svg):not(svg *) { line-height: 2.5 !important; }

html[data-lake-a11y-letter-spacing="1"] body *:not(svg):not(svg *) { letter-spacing: .05em !important; }
html[data-lake-a11y-letter-spacing="2"] body *:not(svg):not(svg *) { letter-spacing: .1em !important; }
html[data-lake-a11y-letter-spacing="3"] body *:not(svg):not(svg *) { letter-spacing: .15em !important; }
html[data-lake-a11y-letter-spacing="4"] body *:not(svg):not(svg *) { letter-spacing: .2em !important; }

html[data-lake-a11y-word-spacing="1"] body *:not(svg):not(svg *) { word-spacing: .1em !important; }
html[data-lake-a11y-word-spacing="2"] body *:not(svg):not(svg *) { word-spacing: .2em !important; }
html[data-lake-a11y-word-spacing="3"] body *:not(svg):not(svg *) { word-spacing: .3em !important; }

/* ---------- Easy-read font (icon fonts and pseudo-elements untouched) ---------- */
html.lake-a11y-readable-font body:is(#lake-a11y-s1,*):is(#lake-a11y-s2,*),
html.lake-a11y-readable-font body:is(#lake-a11y-s1,*):is(#lake-a11y-s2,*) *:not(i):not([class*="icon"]):not([class*="fa-"]):not([class^="fa"]):not(.et-pb-icon):not([data-icon]):not(.dashicons):not(svg):not(svg *):not(code):not(pre):not(kbd):not(samp) {
	font-family: Verdana, Tahoma, "Segoe UI", Arial, Helvetica, sans-serif !important;
}

/* ---------- Text alignment ---------- */
html[data-lake-a11y-text-align="left"] body :is(p, li, h1, h2, h3, h4, h5, h6, td, th, dd, dt, blockquote, figcaption, label, div, span, section, article) { text-align: left !important; }
html[data-lake-a11y-text-align="center"] body :is(p, li, h1, h2, h3, h4, h5, h6, td, th, dd, dt, blockquote, figcaption, label, div, span, section, article) { text-align: center !important; }
html[data-lake-a11y-text-align="right"] body :is(p, li, h1, h2, h3, h4, h5, h6, td, th, dd, dt, blockquote, figcaption, label, div, span, section, article) { text-align: right !important; }

/* ---------- Outline headings / emphasize links ---------- */
html.lake-a11y-highlight-titles body:is(#lake-a11y-s1,*):is(#lake-a11y-s2,*) :is(h1, h2, h3, h4, h5, h6, [role="heading"]) {
	outline: 3px solid currentColor !important;
	outline-offset: 4px !important;
}
html.lake-a11y-highlight-links body:is(#lake-a11y-s1,*):is(#lake-a11y-s2,*) a[href] {
	text-decoration: underline !important;
	text-decoration-thickness: 2px !important;
	text-underline-offset: 3px !important;
	outline: 2px dashed currentColor !important;
	outline-offset: 2px !important;
}

/* ---------- Dark mode ---------- */
html.lake-a11y-dark-contrast,
html.lake-a11y-dark-contrast body:is(#lake-a11y-s1,*):is(#lake-a11y-s2,*) { background-color: #121212 !important; color: #f1f1f1 !important; }
html.lake-a11y-dark-contrast body:is(#lake-a11y-s1,*):is(#lake-a11y-s2,*) *:not(img):not(picture):not(video):not(canvas):not(svg):not(svg *):not(iframe) {
	background-color: #121212 !important;
	color: #f1f1f1 !important;
	background-image: none !important;
	border-color: #6b6b6b !important;
	text-shadow: none !important;
}
html.lake-a11y-dark-contrast body:is(#lake-a11y-s1,*):is(#lake-a11y-s2,*) :is(h1, h2, h3, h4, h5, h6, [role="heading"]),
html.lake-a11y-dark-contrast body:is(#lake-a11y-s1,*):is(#lake-a11y-s2,*) :is(h1, h2, h3, h4, h5, h6, [role="heading"]) * { color: #ffffff !important; }
html.lake-a11y-dark-contrast body:is(#lake-a11y-s1,*):is(#lake-a11y-s2,*) :is(button, input, select, textarea, .et_pb_button, [role="button"]) { background-color: #1e1e1e !important; border: 1px solid #a3a3a3 !important; }
html.lake-a11y-dark-contrast body:is(#lake-a11y-s1,*):is(#lake-a11y-s2,*) a[href],
html.lake-a11y-dark-contrast body:is(#lake-a11y-s1,*):is(#lake-a11y-s2,*) a[href] * { color: #8fd3ff !important; }
html.lake-a11y-dark-contrast body:is(#lake-a11y-s1,*):is(#lake-a11y-s2,*) ::placeholder { color: #c4c4c4 !important; }

/* ---------- Light mode ---------- */
html.lake-a11y-light-contrast,
html.lake-a11y-light-contrast body:is(#lake-a11y-s1,*):is(#lake-a11y-s2,*) { background-color: #ffffff !important; color: #111111 !important; }
html.lake-a11y-light-contrast body:is(#lake-a11y-s1,*):is(#lake-a11y-s2,*) *:not(img):not(picture):not(video):not(canvas):not(svg):not(svg *):not(iframe) {
	background-color: #ffffff !important;
	color: #111111 !important;
	background-image: none !important;
	border-color: #767676 !important;
	text-shadow: none !important;
}
html.lake-a11y-light-contrast body:is(#lake-a11y-s1,*):is(#lake-a11y-s2,*) :is(h1, h2, h3, h4, h5, h6, [role="heading"]),
html.lake-a11y-light-contrast body:is(#lake-a11y-s1,*):is(#lake-a11y-s2,*) :is(h1, h2, h3, h4, h5, h6, [role="heading"]) * { color: #000000 !important; }
html.lake-a11y-light-contrast body:is(#lake-a11y-s1,*):is(#lake-a11y-s2,*) :is(button, input, select, textarea, .et_pb_button, [role="button"]) { background-color: #f4f4f4 !important; border: 1px solid #555555 !important; }
html.lake-a11y-light-contrast body:is(#lake-a11y-s1,*):is(#lake-a11y-s2,*) a[href],
html.lake-a11y-light-contrast body:is(#lake-a11y-s1,*):is(#lake-a11y-s2,*) a[href] * { color: #0645ad !important; }
html.lake-a11y-light-contrast body:is(#lake-a11y-s1,*):is(#lake-a11y-s2,*) ::placeholder { color: #595959 !important; }

/* ---------- Custom text / heading / background colours ----------
   Swatch values map to CSS variables here so the early <head> script
   (which only sets attributes) paints them before widget.js loads. */
html[data-lake-a11y-text-color="#1f3a93"] { --lake-a11y-text-color: #1f3a93; }
html[data-lake-a11y-text-color="#0b5cad"] { --lake-a11y-text-color: #0b5cad; }
html[data-lake-a11y-text-color="#0b7a75"] { --lake-a11y-text-color: #0b7a75; }
html[data-lake-a11y-text-color="#2e7d32"] { --lake-a11y-text-color: #2e7d32; }
html[data-lake-a11y-text-color="#7b4a1d"] { --lake-a11y-text-color: #7b4a1d; }
html[data-lake-a11y-text-color="#6a3d9a"] { --lake-a11y-text-color: #6a3d9a; }
html[data-lake-a11y-text-color="#8b1a3d"] { --lake-a11y-text-color: #8b1a3d; }
html[data-lake-a11y-text-color="#111111"] { --lake-a11y-text-color: #111111; }
html[data-lake-a11y-text-color="#ffffff"] { --lake-a11y-text-color: #ffffff; }
html[data-lake-a11y-text-color="#ffd400"] { --lake-a11y-text-color: #ffd400; }
html[data-lake-a11y-title-color="#1f3a93"] { --lake-a11y-title-color: #1f3a93; }
html[data-lake-a11y-title-color="#0b5cad"] { --lake-a11y-title-color: #0b5cad; }
html[data-lake-a11y-title-color="#0b7a75"] { --lake-a11y-title-color: #0b7a75; }
html[data-lake-a11y-title-color="#2e7d32"] { --lake-a11y-title-color: #2e7d32; }
html[data-lake-a11y-title-color="#7b4a1d"] { --lake-a11y-title-color: #7b4a1d; }
html[data-lake-a11y-title-color="#6a3d9a"] { --lake-a11y-title-color: #6a3d9a; }
html[data-lake-a11y-title-color="#8b1a3d"] { --lake-a11y-title-color: #8b1a3d; }
html[data-lake-a11y-title-color="#111111"] { --lake-a11y-title-color: #111111; }
html[data-lake-a11y-title-color="#ffffff"] { --lake-a11y-title-color: #ffffff; }
html[data-lake-a11y-title-color="#ffd400"] { --lake-a11y-title-color: #ffd400; }
html[data-lake-a11y-bg-color="#1f3a93"] { --lake-a11y-bg-color: #1f3a93; }
html[data-lake-a11y-bg-color="#0b5cad"] { --lake-a11y-bg-color: #0b5cad; }
html[data-lake-a11y-bg-color="#0b7a75"] { --lake-a11y-bg-color: #0b7a75; }
html[data-lake-a11y-bg-color="#2e7d32"] { --lake-a11y-bg-color: #2e7d32; }
html[data-lake-a11y-bg-color="#7b4a1d"] { --lake-a11y-bg-color: #7b4a1d; }
html[data-lake-a11y-bg-color="#6a3d9a"] { --lake-a11y-bg-color: #6a3d9a; }
html[data-lake-a11y-bg-color="#8b1a3d"] { --lake-a11y-bg-color: #8b1a3d; }
html[data-lake-a11y-bg-color="#111111"] { --lake-a11y-bg-color: #111111; }
html[data-lake-a11y-bg-color="#ffffff"] { --lake-a11y-bg-color: #ffffff; }
html[data-lake-a11y-bg-color="#ffd400"] { --lake-a11y-bg-color: #ffd400; }

html:root[data-lake-a11y-text-color] body:is(#lake-a11y-s1,*):is(#lake-a11y-s2,*),
html:root[data-lake-a11y-text-color] body:is(#lake-a11y-s1,*):is(#lake-a11y-s2,*) *:not(img):not(picture):not(video):not(canvas):not(svg):not(svg *):not(iframe) {
	color: var(--lake-a11y-text-color) !important;
}
html:root[data-lake-a11y-title-color] body:is(#lake-a11y-s1,*):is(#lake-a11y-s2,*) :is(h1, h2, h3, h4, h5, h6, [role="heading"]),
html:root[data-lake-a11y-title-color] body:is(#lake-a11y-s1,*):is(#lake-a11y-s2,*) :is(h1, h2, h3, h4, h5, h6, [role="heading"]) * {
	color: var(--lake-a11y-title-color) !important;
}
html:root[data-lake-a11y-bg-color],
html:root[data-lake-a11y-bg-color] body:is(#lake-a11y-s1,*):is(#lake-a11y-s2,*),
html:root[data-lake-a11y-bg-color] body:is(#lake-a11y-s1,*):is(#lake-a11y-s2,*) *:not(img):not(picture):not(video):not(canvas):not(svg):not(svg *):not(iframe) {
	background-color: var(--lake-a11y-bg-color) !important;
}

/* ---------- Hide images ---------- */
html.lake-a11y-hide-images body:is(#lake-a11y-s1,*):is(#lake-a11y-s2,*) :is(img, picture, video[poster], svg[role="img"], [role="img"]) { visibility: hidden !important; }
html.lake-a11y-hide-images body:is(#lake-a11y-s1,*):is(#lake-a11y-s2,*),
html.lake-a11y-hide-images body:is(#lake-a11y-s1,*):is(#lake-a11y-s2,*) * { background-image: none !important; }

/* ---------- Pause motion ----------
   Durations are collapsed rather than removed so elements that animate
   in from opacity:0 (common in page builders) still reach their end state. */
html.lake-a11y-stop-animations *,
html.lake-a11y-stop-animations *::before,
html.lake-a11y-stop-animations *::after {
	animation-duration: .001ms !important;
	animation-delay: 0s !important;
	animation-iteration-count: 1 !important;
	transition-duration: .001ms !important;
	transition-delay: 0s !important;
	scroll-behavior: auto !important;
}
html.lake-a11y-stop-animations marquee { display: none !important; }

/* ---------- Outline on hover ---------- */
html.lake-a11y-highlight-hover body:is(#lake-a11y-s1,*):is(#lake-a11y-s2,*) :is(a, button, input, select, textarea, label, summary, [role="button"], [role="link"], [tabindex], h1, h2, h3, h4, h5, h6, p, li, img, td, th):hover {
	outline: 3px solid #d1006b !important;
	outline-offset: 2px !important;
}

/* ---------- Strong focus outline (yellow inner ring + black outer ring) ---------- */
html.lake-a11y-highlight-focus body:is(#lake-a11y-s1,*):is(#lake-a11y-s2,*) :focus {
	outline: 3px solid #111111 !important;
	outline-offset: 3px !important;
	box-shadow: 0 0 0 3px #ffd400 !important;
}

/* ---------- Large cursor ---------- */
html[data-lake-a11y-big-cursor="black"],
html[data-lake-a11y-big-cursor="black"] body:is(#lake-a11y-s1,*):is(#lake-a11y-s2,*),
html[data-lake-a11y-big-cursor="black"] body:is(#lake-a11y-s1,*):is(#lake-a11y-s2,*) * {
	cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cpath d='M9 4v34l9-8.5 6.2 14 6.3-2.8-6.2-13.7H37z' fill='%23000' stroke='%23fff' stroke-width='2.5' stroke-linejoin='round'/%3E%3C/svg%3E") 9 4, auto !important;
}
html[data-lake-a11y-big-cursor="white"],
html[data-lake-a11y-big-cursor="white"] body:is(#lake-a11y-s1,*):is(#lake-a11y-s2,*),
html[data-lake-a11y-big-cursor="white"] body:is(#lake-a11y-s1,*):is(#lake-a11y-s2,*) * {
	cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cpath d='M9 4v34l9-8.5 6.2 14 6.3-2.8-6.2-13.7H37z' fill='%23fff' stroke='%23000' stroke-width='2.5' stroke-linejoin='round'/%3E%3C/svg%3E") 9 4, auto !important;
}

/* ---------- Widget helpers on page elements ---------- */
[data-lake-a11y-speaking] {
	outline: 3px solid #ffd400 !important;
	outline-offset: 2px !important;
	background-color: rgba(255, 212, 0, .22) !important;
}
[data-lake-a11y-target] {
	outline: 4px solid #d1006b !important;
	outline-offset: 4px !important;
}
