/* Content Mode Styles — applied to page content only, not accessibility panel */

#a11y-content-root {
	font-size: calc(100% * var(--a11y-font-scale, 1));
	line-height: calc(1.5 + var(--a11y-line-height-extra, 0em));
	word-spacing: calc(0px + var(--a11y-word-spacing-extra, 0px));
	letter-spacing: calc(0px + var(--a11y-letter-spacing-extra, 0px));
	zoom: var(--a11y-zoom, 1);
}

@supports not (zoom: 1) {
	#a11y-content-root {
		transform: scale(var(--a11y-zoom, 1));
		transform-origin: top center;
	}
}

/* Widget is isolated from page typography adjustments */
.a11y-widget,
.a11y-widget * {
	font-size: inherit;
	line-height: inherit;
	letter-spacing: normal !important;
	word-spacing: normal !important;
	zoom: 1 !important;
	transform: none !important;
}

.a11y-widget {
	font-size: 14px !important;
	line-height: 1.5 !important;
}

/* Readable font */
html.a11y-readable-font #a11y-content-root,
html.a11y-readable-font #a11y-content-root * {
	font-family: Arial, Helvetica, sans-serif !important;
}

/* Stop animations */
html.a11y-stop-animations #a11y-content-root *,
html.a11y-stop-animations #a11y-content-root *::before,
html.a11y-stop-animations #a11y-content-root *::after {
	animation-duration: 0.001ms !important;
	animation-iteration-count: 1 !important;
	transition-duration: 0.001ms !important;
	scroll-behavior: auto !important;
}

/* Highlight links */
html.a11y-highlight-links #a11y-content-root a {
	background-color: #ffff00 !important;
	color: #000 !important;
	text-decoration: underline !important;
	outline: 2px solid #000 !important;
}

/* Highlight headings */
html.a11y-highlight-headings #a11y-content-root h1,
html.a11y-highlight-headings #a11y-content-root h2,
html.a11y-highlight-headings #a11y-content-root h3,
html.a11y-highlight-headings #a11y-content-root h4,
html.a11y-highlight-headings #a11y-content-root h5,
html.a11y-highlight-headings #a11y-content-root h6 {
	background-color: #e8e8e8 !important;
	border-right: 4px solid #2563eb !important;
	padding: 4px 8px !important;
}

/* Keyboard navigation enhanced focus */
html.a11y-keyboard-nav #a11y-content-root *:focus-visible {
	outline: 3px solid #ff6600 !important;
	outline-offset: 2px !important;
}

/* Screen reader enhancements */
html.a11y-screen-reader #a11y-content-root img:not([alt]),
html.a11y-screen-reader #a11y-content-root img[alt=""] {
	outline: 3px dashed red !important;
}

/* Custom cursors */
html.a11y-cursor-black #a11y-content-root,
html.a11y-cursor-black #a11y-content-root * {
	cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' stroke='%23fff' stroke-width='1' d='M4 2l16 10-7 2-3 8z'/%3E%3C/svg%3E") 4 2, auto !important;
}

html.a11y-cursor-white #a11y-content-root,
html.a11y-cursor-white #a11y-content-root * {
	cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' stroke='%23000' stroke-width='1' d='M4 2l16 10-7 2-3 8z'/%3E%3C/svg%3E") 4 2, auto !important;
}

/* Reading focus dimming */
html.a11y-reading-focus-active #a11y-content-root::before {
	content: '';
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.6);
	z-index: 999990;
	pointer-events: none;
}

html.a11y-reading-focus-active #a11y-content-root *:focus {
	position: relative;
	z-index: 999991 !important;
	background: #fff !important;
	box-shadow: 0 0 0 4px #2563eb !important;
}

/* Image descriptions mode */
html.a11y-image-descriptions #a11y-content-root .a11y-img-wrapper {
	position: relative;
	display: inline-block;
}
