/**
 * Accessibility Module – page adjustments.
 *
 * Every rule is scoped to a class on <html> added by united-a11y.js, so nothing here
 * affects the page until a visitor turns a feature on. The toolbar itself
 * lives in a Shadow DOM (#united-a11y-root) and is styled by united-a11y-widget.css.
 */

@font-face {
	font-family: "United A11y OpenDyslexic";
	src: url("../fonts/opendyslexic-400.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "United A11y OpenDyslexic";
	src: url("../fonts/opendyslexic-700.woff2") format("woff2");
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

/* Skip link ------------------------------------------------------------- */
.united-a11y-skip-link {
	position: absolute;
	top: 8px;
	left: -9999px;
	z-index: 2147483647;
	padding: 12px 18px;
	background: #000;
	color: #fff;
	font: 600 16px/1.2 system-ui, sans-serif;
	text-decoration: underline;
	border-radius: 6px;
}
.united-a11y-skip-link:focus {
	left: 8px;
	outline: 3px solid #ffbf47;
}

/* Print ------------------------------------------------------------------ */
@media print {
	#united-a11y-root.united-a11y-noprint {
		display: none !important;
	}
}

/* Filters: high contrast, monochrome, saturation (combined by JS) ---------- */
html.united-a11y-filter {
	filter: var(--united-a11y-filter);
}

/* Line height ------------------------------------------------------------- */
html.united-a11y-line-height-1 body * { line-height: 1.7 !important; }
html.united-a11y-line-height-2 body * { line-height: 2 !important; }
html.united-a11y-line-height-3 body * { line-height: 2.4 !important; }

/* Letter spacing ---------------------------------------------------------- */
html.united-a11y-letter-spacing-1 body * { letter-spacing: .05em !important; word-spacing: .1em !important; }
html.united-a11y-letter-spacing-2 body * { letter-spacing: .1em !important; word-spacing: .16em !important; }
html.united-a11y-letter-spacing-3 body * { letter-spacing: .16em !important; word-spacing: .24em !important; }

/* Font weight ------------------------------------------------------------- */
html.united-a11y-font-weight body *:not(i):not([class*="icon"]):not([class*="fa-"]):not(.dashicons) {
	font-weight: 700 !important;
}

/* Readable & dyslexic fonts (icon fonts and code are left alone) ----------- */
html.united-a11y-readable-font body *:not(i):not([class*="icon"]):not([class*="fa-"]):not([class*="dashicons"]):not([class*="eicon"]):not(code):not(pre):not(kbd) {
	font-family: Verdana, Tahoma, "Segoe UI", Arial, sans-serif !important;
}
html.united-a11y-dyslexic-font body *:not(i):not([class*="icon"]):not([class*="fa-"]):not([class*="dashicons"]):not([class*="eicon"]):not(code):not(pre):not(kbd) {
	font-family: "United A11y OpenDyslexic", Verdana, sans-serif !important;
}

/* Text align -------------------------------------------------------------- */
html.united-a11y-text-align-1 body *:not(#united-a11y-root) { text-align: left !important; }
html.united-a11y-text-align-2 body *:not(#united-a11y-root) { text-align: center !important; }
html.united-a11y-text-align-3 body *:not(#united-a11y-root) { text-align: right !important; }

/* Highlight titles -------------------------------------------------------- */
html.united-a11y-highlight-titles body :is(h1, h2, h3, h4, h5, h6, [role="heading"]) {
	outline: 3px solid var(--united-a11y-accent, #1e5bd8) !important;
	outline-offset: 4px;
}

/* Big cursor -------------------------------------------------------------- */
html.united-a11y-big-cursor,
html.united-a11y-big-cursor body * {
	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='M6 3l30 27-13 1 8 15-6 3-8-15-11 9z' fill='%23000' stroke='%23fff' stroke-width='2.5' stroke-linejoin='round'/%3E%3C/svg%3E") 6 3, auto !important;
}
html.united-a11y-big-cursor body :is(a[href], button, [role="button"], label, select, summary, input[type="submit"], input[type="checkbox"], input[type="radio"]),
html.united-a11y-big-cursor body :is(a[href], button, [role="button"], label, summary) * {
	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='M17 4a3 3 0 0 1 6 0v15l2-1a3 3 0 0 1 5 1 3 3 0 0 1 5 1 3 3 0 0 1 5 2v12c0 7-5 12-12 12h-3c-5 0-8-3-11-7L8 30a3 3 0 0 1 4-4l5 5z' fill='%23000' stroke='%23fff' stroke-width='2.5' stroke-linejoin='round'/%3E%3C/svg%3E") 18 2, pointer !important;
}

/* Light contrast ---------------------------------------------------------- */
html.united-a11y-light-contrast body,
html.united-a11y-light-contrast body *:not(img):not(video):not(iframe):not(svg):not(svg *):not(picture):not(canvas) {
	background-color: #fff !important;
	color: #000 !important;
	border-color: #000 !important;
	text-shadow: none !important;
	box-shadow: none !important;
}
html.united-a11y-light-contrast body a[href],
html.united-a11y-light-contrast body a[href] * {
	color: #0b3fae !important;
}
html.united-a11y-light-contrast body svg { color: #000; }

/* Dark contrast ----------------------------------------------------------- */
html.united-a11y-dark-contrast,
html.united-a11y-dark-contrast body,
html.united-a11y-dark-contrast body *:not(img):not(video):not(iframe):not(svg):not(svg *):not(picture):not(canvas) {
	background-color: #000 !important;
	color: #fff !important;
	border-color: #fff !important;
	text-shadow: none !important;
	box-shadow: none !important;
}
html.united-a11y-dark-contrast body a[href],
html.united-a11y-dark-contrast body a[href] * {
	color: #ffe14d !important;
}
html.united-a11y-dark-contrast body :is(h1, h2, h3, h4, h5, h6),
html.united-a11y-dark-contrast body :is(h1, h2, h3, h4, h5, h6) *:not(a) {
	color: #7fdbff !important;
}
html.united-a11y-dark-contrast body svg { color: #fff; }

/* Highlight links (after the contrast modes so it always wins) ----------- */
html.united-a11y-highlight-links body a[href],
html.united-a11y-highlight-links body a[href] *:not(img):not(svg):not(svg *):not(picture) {
	background-color: #ffeb3b !important;
	color: #000 !important;
}
html.united-a11y-highlight-links body a[href] {
	text-decoration: underline !important;
	text-decoration-thickness: 2px !important;
	outline: 2px solid #000 !important;
	outline-offset: 1px;
}
html.united-a11y-highlight-links body a[href] svg {
	color: #000 !important;
}

/* Highlight content (hover / focus) -------------------------------------- */
html.united-a11y-highlight-content body :is(p, li, h1, h2, h3, h4, h5, h6, td, th, dt, dd, blockquote, figure, img, a, button, input, select, textarea, label):is(:hover, :focus) {
	outline: 3px solid var(--united-a11y-accent, #1e5bd8) !important;
	outline-offset: 2px;
}

/* Hide images ------------------------------------------------------------- */
html.united-a11y-hide-images body :is(img, picture, video, svg[role="img"], [role="img"], figure > iframe) {
	visibility: hidden !important;
}
html.united-a11y-hide-images body * {
	background-image: none !important;
}

/* Stop animations --------------------------------------------------------- */
html.united-a11y-stop-animations,
html.united-a11y-stop-animations *,
html.united-a11y-stop-animations *::before,
html.united-a11y-stop-animations *::after {
	animation: none !important;
	transition: none !important;
	scroll-behavior: auto !important;
}

/* Keyboard navigation: strong, always visible focus ----------------------- */
html.united-a11y-keyboard-nav body *:focus,
html.united-a11y-keyboard-nav body *:focus-visible {
	outline: 3px solid var(--united-a11y-accent, #1e5bd8) !important;
	outline-offset: 3px !important;
	box-shadow: 0 0 0 6px #fff !important;
}

/* Text to speech: element being read ------------------------------------ */
.united-a11y-tts-reading {
	outline: 3px dashed var(--united-a11y-accent, #1e5bd8) !important;
	outline-offset: 3px;
	background-color: rgba(255, 235, 59, .35) !important;
}
html.united-a11y-text-to-speech body {
	cursor: help;
}
