/*
 * Page-level adjustments applied by the accessibility toolbar.
 * Each mode is a class on <html>. The toolbar host is excluded everywhere;
 * its Shadow DOM resets inherited styles with `all: initial`.
 */

/* High contrast – dark */
html.bda11y-contrast-dark body,
html.bda11y-contrast-dark body *:not(#bda11y-toolbar-host) {
	background-color: #000 !important;
	background-image: none !important;
	color: #fff !important;
	border-color: #fff !important;
	text-shadow: none !important;
	box-shadow: none !important;
}
html.bda11y-contrast-dark body a:not(#bda11y-toolbar-host),
html.bda11y-contrast-dark body a *:not(#bda11y-toolbar-host) {
	color: #ff0 !important;
}
html.bda11y-contrast-dark body :is(button, input, select, textarea):not(#bda11y-toolbar-host) {
	border: 1px solid #fff !important;
}

/* High contrast – light */
html.bda11y-contrast-light body,
html.bda11y-contrast-light body *:not(#bda11y-toolbar-host) {
	background-color: #fff !important;
	background-image: none !important;
	color: #000 !important;
	border-color: #000 !important;
	text-shadow: none !important;
	box-shadow: none !important;
}
html.bda11y-contrast-light body a:not(#bda11y-toolbar-host),
html.bda11y-contrast-light body a *:not(#bda11y-toolbar-host) {
	color: #0b3d91 !important;
	text-decoration: underline !important;
}
html.bda11y-contrast-light body :is(button, input, select, textarea):not(#bda11y-toolbar-host) {
	border: 1px solid #000 !important;
}

/* Grayscale – applied per top-level child so the toolbar keeps its colors */
html.bda11y-grayscale body > *:not(#bda11y-toolbar-host) {
	filter: grayscale(1) !important;
}

/* Highlight links */
html.bda11y-highlight-links body a:not(#bda11y-toolbar-host) {
	text-decoration: underline !important;
	text-underline-offset: 3px !important;
	outline: 2px dashed currentColor !important;
	outline-offset: 2px !important;
}

/* Highlight headings */
html.bda11y-highlight-heads body :is(h1, h2, h3, h4, h5, h6, [role="heading"]) {
	outline: 3px solid currentColor !important;
	outline-offset: 4px !important;
}

/* Readable font – icon fonts are excluded so icons keep rendering */
html.bda11y-readable-font body *:not(i):not(.fa):not(.fab):not(.fas):not(.far):not(.fal):not([class*="fa-"]):not([class*="icon"]):not(.dashicons):not(.material-icons):not(#bda11y-toolbar-host) {
	font-family: Arial, Helvetica, "Segoe UI", sans-serif !important;
}

/* Text spacing – WCAG 1.4.12 test values */
html.bda11y-text-spacing body *:not(#bda11y-toolbar-host) {
	line-height: 1.5 !important;
	letter-spacing: 0.12em !important;
	word-spacing: 0.16em !important;
}
html.bda11y-text-spacing body p {
	margin-bottom: 2em !important;
}

/* Stop animations – jump to the end state rather than `animation: none`,
   which would leave "fade-in" elements invisible. */
html.bda11y-stop-animations *,
html.bda11y-stop-animations *::before,
html.bda11y-stop-animations *::after {
	animation-duration: 0.001ms !important;
	animation-delay: 0s !important;
	animation-iteration-count: 1 !important;
	transition-duration: 0.001ms !important;
	transition-delay: 0s !important;
	scroll-behavior: auto !important;
}

/* Big cursor */
html.bda11y-big-cursor,
html.bda11y-big-cursor * {
	cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24'%3E%3Cpath d='M4 2l16 9.5-7 1.6L9.4 20z' fill='%23000' stroke='%23fff' stroke-width='1.5' stroke-linejoin='round'/%3E%3C/svg%3E") 8 4, auto !important;
}
