/* Ewerle Barrierefreiheit */

/* ---------- Widget ---------- */
#ewa-root {
	--ewa-accent: #42c9ff;
	--ewa-bg: #0b0f14;
	--ewa-text: #ffffff;
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 99990;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 16px;
	line-height: 1.4;
}
#ewa-root *,
#ewa-root *::before,
#ewa-root *::after { box-sizing: border-box; }

#ewa-root button {
	font: inherit;
	letter-spacing: normal;
	text-transform: none;
	cursor: pointer;
	margin: 0;
	box-shadow: none;
}
#ewa-root button:focus-visible,
#ewa-root a:focus-visible {
	outline: 3px solid #ffd400 !important;
	outline-offset: 2px;
}

#ewa-toggle {
	width: 56px;
	height: 56px;
	padding: 0;
	border-radius: 50%;
	border: 2px solid #ffffff;
	background: var(--ewa-accent);
	color: #000000;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .45);
}
#ewa-toggle:hover { background: #ffffff; }

#ewa-panel {
	position: absolute;
	right: 0;
	bottom: 68px;
	width: 320px;
	max-width: calc(100vw - 40px);
	max-height: calc(100vh - 110px);
	overflow-y: auto;
	padding: 16px;
	border-radius: 8px;
	border: 1px solid var(--ewa-accent);
	background: var(--ewa-bg);
	color: var(--ewa-text);
	box-shadow: 0 8px 30px rgba(0, 0, 0, .6);
}
#ewa-panel[hidden] { display: none; }

#ewa-root .ewa-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
}
#ewa-root #ewa-title {
	margin: 0;
	padding: 0;
	font-family: inherit;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: normal;
	text-transform: none;
	color: var(--ewa-text);
}
#ewa-root .ewa-close {
	width: 36px;
	height: 36px;
	padding: 0;
	border: 1px solid #5a6573;
	border-radius: 6px;
	background: transparent;
	color: var(--ewa-text);
	font-size: 22px;
	line-height: 1;
}

#ewa-root .ewa-font {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 12px;
}
#ewa-root .ewa-label { flex: 1; font-weight: 700; }
#ewa-root .ewa-font span[aria-live] { min-width: 52px; text-align: center; }
#ewa-root .ewa-font button {
	width: 44px;
	height: 40px;
	padding: 0;
	border: 1px solid #5a6573;
	border-radius: 6px;
	background: #1b232d;
	color: var(--ewa-text);
	font-weight: 700;
}
#ewa-root .ewa-font button:disabled { opacity: .4; cursor: not-allowed; }

#ewa-root .ewa-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	margin-bottom: 12px;
}
#ewa-root .ewa-grid button {
	min-height: 52px;
	padding: 8px;
	border: 1px solid #5a6573;
	border-radius: 6px;
	background: #1b232d;
	color: var(--ewa-text);
	font-size: 14px;
	line-height: 1.25;
	text-align: center;
}
#ewa-root .ewa-grid button[aria-pressed="true"] {
	background: var(--ewa-accent);
	border-color: var(--ewa-accent);
	color: #000000;
	font-weight: 700;
}

#ewa-root .ewa-reset {
	width: 100%;
	padding: 10px;
	border: 1px solid #5a6573;
	border-radius: 6px;
	background: transparent;
	color: var(--ewa-text);
}
#ewa-root .ewa-statement {
	display: block;
	margin-top: 12px;
	color: var(--ewa-accent);
	text-decoration: underline;
	text-align: center;
}

@media (max-width: 480px) {
	#ewa-root { right: 12px; bottom: 12px; }
	#ewa-toggle { width: 50px; height: 50px; }
	#ewa-panel { bottom: 62px; }
}

/* ---------- Funktionen ---------- */

/* Schriftgröße */
html.ewa-font-1 { zoom: 1.1; }
html.ewa-font-2 { zoom: 1.2; }
html.ewa-font-3 { zoom: 1.35; }

/* Hoher Kontrast */
html.ewa-contrast body *:not(#ewa-root):not(#ewa-root *):not(img):not(video):not(svg):not(svg *) {
	background-color: #000000 !important;
	background-image: none !important;
	color: #ffffff !important;
	border-color: #ffffff !important;
	text-shadow: none !important;
	box-shadow: none !important;
}
html.ewa-contrast body a:not(#ewa-root *),
html.ewa-contrast body a:not(#ewa-root *) * {
	color: #ffff00 !important;
}
html.ewa-contrast body button:not(#ewa-root *),
html.ewa-contrast body .elementor-button {
	outline: 2px solid #ffff00 !important;
}

/* Links hervorheben */
html.ewa-links body a:not(#ewa-root *) {
	text-decoration: underline !important;
	text-decoration-thickness: 2px !important;
	text-underline-offset: 3px !important;
	outline: 2px dashed #ffd400 !important;
	outline-offset: 2px !important;
}

/* Lesbare Schrift */
html.ewa-readable body *:not(#ewa-root *):not(i):not([class*="icon"]):not([class*="fa-"]):not([class*="eicon"]) {
	font-family: Arial, Verdana, Helvetica, sans-serif !important;
	letter-spacing: .03em !important;
	word-spacing: .08em !important;
}

/* Lesemodus: ruhiges Schriftbild, mehr Zeilenabstand, keine Hintergrundbilder */
html.ewa-reading body *:not(#ewa-root):not(#ewa-root *) {
	background-image: none !important;
	animation: none !important;
	transition: none !important;
}
html.ewa-reading body p:not(#ewa-root *),
html.ewa-reading body li:not(#ewa-root *),
html.ewa-reading body .elementor-widget-text-editor:not(#ewa-root *) {
	line-height: 1.9 !important;
	letter-spacing: .02em !important;
	max-width: 75ch;
}
html.ewa-reading body .elementor-background-overlay,
html.ewa-reading body .elementor-background-video-container,
html.ewa-reading body canvas:not(#ewa-root *) {
	display: none !important;
}

/* Animationen stoppen */
html.ewa-motion *,
html.ewa-motion *::before,
html.ewa-motion *::after {
	animation-duration: 0s !important;
	animation-iteration-count: 1 !important;
	transition-duration: 0s !important;
	scroll-behavior: auto !important;
}
html.ewa-motion body canvas:not(#ewa-root *) { display: none !important; }

/* Graustufen */
html.ewa-grayscale { filter: grayscale(1); }

/* Großer Mauszeiger */
html.ewa-cursor,
html.ewa-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-7 2-3 7z' fill='%23000' stroke='%23fff' stroke-width='1.5'/%3E%3C/svg%3E") 4 2, auto !important;
}

/* Lesehilfe */
#ewa-guide {
	display: none;
	position: fixed;
	left: 0;
	right: 0;
	top: 50%;
	height: 4px;
	background: #ffd400;
	box-shadow: 0 0 0 1px #000000;
	z-index: 99989;
	pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
	#ewa-root * { transition: none !important; }
}
