/* VUZ Accessibility toolbar — VUZ Aurora purple, RTL, self-contained. */

:root {
	--vuz-a11y-purple: #9333ea;
	--vuz-a11y-purple-dark: #7e22ce;
	--vuz-a11y-font-scale: 1;
}

/* Font scaling — scale the ROOT (<html>) font-size, not <body>, so that rem-based
   text (which is what Tailwind uses for text-sm/base/lg/xl/...) scales too.
   Scaling <body> only affects em/%-based text, which is why it appeared to do nothing. */
html.vuz-a11y-font-scaled {
	font-size: calc(100% * var(--vuz-a11y-font-scale)) !important;
}

/* User display features (toggled by the toolbar). */
html.vuz-a11y-contrast-high body {
	background: #fff !important;
	color: #000 !important;
}
html.vuz-a11y-contrast-high a {
	color: #00118f !important;
}
html.vuz-a11y-contrast-dark body,
html.vuz-a11y-contrast-dark body * {
	background-color: #000 !important;
	color: #fff !important;
	border-color: #fff !important;
}
html.vuz-a11y-contrast-dark a {
	color: #ffd400 !important;
}
html.vuz-a11y-highlight-links a {
	outline: 2px solid #ffbf00 !important;
	text-decoration: underline !important;
	background: #fff8e1 !important;
	color: #000 !important;
}
html.vuz-a11y-readable-font body,
html.vuz-a11y-readable-font body * {
	font-family: Arial, "Arimo", sans-serif !important;
	letter-spacing: normal !important;
}
html.vuz-a11y-spacing body {
	letter-spacing: 0.12em !important;
	word-spacing: 0.16em !important;
	line-height: 1.8 !important;
}
html.vuz-a11y-stop-anim *,
html.vuz-a11y-stop-anim *::before,
html.vuz-a11y-stop-anim *::after {
	animation: none !important;
	transition: none !important;
	scroll-behavior: auto !important;
}

/* ---- Toolbar widget chrome ---- */
.vuz-a11y-toolbar {
	position: fixed;
	inset-inline-start: 16px;
	inset-block-end: 16px;
	z-index: 99999;
	font-family: "Arimo", Arial, sans-serif;
}

.vuz-a11y-toggle {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	border: 3px solid #fff;
	background: var(--vuz-a11y-purple);
	color: #fff;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
	display: flex;
	align-items: center;
	justify-content: center;
}
.vuz-a11y-toggle:hover {
	background: var(--vuz-a11y-purple-dark);
}
.vuz-a11y-toggle:focus-visible {
	outline: 3px solid #ffbf00;
	outline-offset: 2px;
}

.vuz-a11y-panel {
	position: absolute;
	inset-block-end: 68px;
	inset-inline-start: 0;
	width: 320px;
	max-width: 90vw;
	background: #fff;
	color: #1a1a1a;
	border: 2px solid var(--vuz-a11y-purple);
	border-radius: 14px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
	padding: 16px;
}
.vuz-a11y-panel[hidden] {
	display: none;
}

.vuz-a11y-panel-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-block-end: 12px;
}
.vuz-a11y-panel-title {
	margin: 0;
	font-size: 18px;
	color: var(--vuz-a11y-purple-dark);
}
.vuz-a11y-close {
	background: transparent;
	border: none;
	font-size: 18px;
	cursor: pointer;
	color: #555;
	padding: 4px 8px;
	border-radius: 6px;
}
.vuz-a11y-close:focus-visible {
	outline: 3px solid var(--vuz-a11y-purple);
}

.vuz-a11y-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
}

.vuz-a11y-btn {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 12px 6px;
	background: #f5f3ff;
	border: 2px solid transparent;
	border-radius: 10px;
	cursor: pointer;
	font-size: 13px;
	color: #1a1a1a;
	text-align: center;
}
.vuz-a11y-btn:hover {
	border-color: var(--vuz-a11y-purple);
}
.vuz-a11y-btn:focus-visible {
	outline: 3px solid var(--vuz-a11y-purple);
	outline-offset: 1px;
}
.vuz-a11y-btn[aria-pressed="true"] {
	background: var(--vuz-a11y-purple);
	color: #fff;
	border-color: var(--vuz-a11y-purple-dark);
}
.vuz-a11y-btn-icon {
	font-size: 20px;
	font-weight: 700;
}

.vuz-a11y-reset {
	width: 100%;
	margin-block-start: 12px;
	padding: 10px;
	background: #fff;
	border: 2px solid #d1d5db;
	border-radius: 10px;
	cursor: pointer;
	font-size: 14px;
	color: #1a1a1a;
}
.vuz-a11y-reset:hover {
	border-color: var(--vuz-a11y-purple);
}
.vuz-a11y-reset:focus-visible {
	outline: 3px solid var(--vuz-a11y-purple);
}

.vuz-a11y-statement-link {
	display: block;
	margin-block-start: 10px;
	text-align: center;
	font-size: 13px;
	color: var(--vuz-a11y-purple-dark);
}

/* Respect users who prefer reduced motion by default. */
@media (prefers-reduced-motion: reduce) {
	.vuz-a11y-toggle,
	.vuz-a11y-btn {
		transition: none;
	}
}
