/* =========================================================
   Farben und Position werden NICHT hier festgelegt, sondern
   dynamisch aus Einstellungen → Barrierefreiheit im Backend
   erzeugt (siehe a11yw_enqueue_assets() im Haupt-Plugin).
   Diese Datei enthält nur die Struktur/Form des Widgets.
   ========================================================= */

:root {
	--a11yw-radius: 16px;
	--a11yw-shadow: 0 12px 32px rgba(20, 16, 24, 0.22);
	--a11yw-text: #2D2438;
	--a11yw-white: #FFFFFF;
}

#a11yw-root,
#a11yw-root *,
#a11yw-root *::before,
#a11yw-root *::after {
	box-sizing: border-box;
}

/* =========================================================
   Auslöser-Button
   ========================================================= */
#a11yw-root {
	position: fixed !important;
	z-index: 2147483647 !important;
	bottom: 24px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

#a11yw-toggle {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	border: none;
	background: var(--a11yw-primary, #501045);
	color: var(--a11yw-white);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: var(--a11yw-shadow);
	transition: background 0.15s ease, transform 0.15s ease;
}

#a11yw-toggle:hover,
#a11yw-toggle:focus-visible {
	background: var(--a11yw-primary-dark, #3C0C33);
	transform: scale(1.05);
}

#a11yw-toggle:focus-visible {
	outline: 3px solid var(--a11yw-primary-dark, #3C0C33);
	outline-offset: 3px;
}

/* =========================================================
   Panel
   ========================================================= */
#a11yw-panel {
	position: absolute;
	bottom: 68px;
	width: 320px;
	max-width: calc(100vw - 32px);
	max-height: 78vh;
	overflow-y: auto;
	overflow-x: hidden;
	background: var(--a11yw-white);
	color: var(--a11yw-text);
	border-radius: var(--a11yw-radius);
	box-shadow: var(--a11yw-shadow);
}

#a11yw-panel[hidden] {
	display: none;
}

#a11yw-panel-header {
	position: sticky;
	top: 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 16px 18px;
	background: var(--a11yw-primary, #501045);
	color: var(--a11yw-white);
	border-radius: var(--a11yw-radius) var(--a11yw-radius) 0 0;
}

#a11yw-panel-title-wrap {
	display: flex;
	align-items: center;
	gap: 8px;
}

#a11yw-panel-title {
	margin: 0;
	font-size: 17px;
	font-weight: 700;
}

#a11yw-panel-actions {
	display: flex;
	gap: 6px;
}

#a11yw-panel-actions button {
	width: 30px;
	height: 30px;
	border: none;
	background: transparent;
	color: var(--a11yw-white);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}

#a11yw-panel-actions button svg {
	stroke: currentColor;
	overflow: visible;
}

#a11yw-panel-actions button:hover,
#a11yw-panel-actions button:focus-visible {
	background: rgba(255, 255, 255, 0.22);
}

#a11yw-panel-body {
	padding: 16px 16px 4px;
}

.a11yw-group {
	background: var(--a11yw-primary-light, #F4F0F3);
	border-radius: 12px;
	padding: 14px;
	margin-bottom: 14px;
}

.a11yw-group h3 {
	margin: 0 0 10px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.02em;
	color: var(--a11yw-text);
}

.a11yw-grid {
	display: flex !important;
	flex-direction: column !important;
	align-items: stretch !important;
	gap: 8px;
}

.a11yw-option {
	display: flex !important;
	flex-direction: row !important;
	align-items: center !important;
	justify-content: flex-start !important;
	width: 100% !important;
	gap: 10px;
	background: #ffffff !important;
	border: 1.5px solid #DADADA !important;
	border-radius: 10px;
	padding: 10px 12px;
	font-size: 13px;
	line-height: 1.25;
	color: #000 !important;
	cursor: pointer;
	text-align: left !important;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.a11yw-option span {
	text-align: left !important;
}

.a11yw-option .a11yw-icon {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 22px;
	height: 22px;
	flex-shrink: 0;
	color: #000 !important;
}

.a11yw-option .a11yw-icon svg {
	display: block;
	width: 20px;
	height: 20px;
}

.a11yw-icon-sub {
	font-size: 11px;
	vertical-align: super;
}

.a11yw-option:hover,
.a11yw-option:focus-visible {
	border-color: #999999 !important;
	background: #f2f2f2 !important;
}

.a11yw-option[aria-pressed="true"] {
	background: var(--a11yw-primary, #501045) !important;
	border-color: var(--a11yw-primary, #501045) !important;
}

.a11yw-option[aria-pressed="true"] .a11yw-icon,
.a11yw-option[aria-pressed="true"] span {
	color: var(--a11yw-white) !important;
}

/* =========================================================
   Text-Controls (Stepper + Ausrichtungs-Gruppe)
   ========================================================= */
.a11yw-control {
	display: flex !important;
	flex-direction: column !important;
	align-items: stretch !important;
	gap: 8px;
	background: #ffffff !important;
	border: 1.5px solid #DADADA !important;
	border-radius: 10px;
	padding: 10px 12px;
}

.a11yw-control-label {
	display: flex !important;
	align-items: center !important;
	gap: 10px;
	font-size: 13px;
	line-height: 1.25;
	color: #000 !important;
}

.a11yw-control-label .a11yw-icon {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 22px;
	height: 22px;
	flex-shrink: 0;
	color: #000 !important;
}

.a11yw-control-label .a11yw-icon svg {
	display: block;
	width: 20px;
	height: 20px;
}

.a11yw-stepper {
	display: flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	gap: 8px;
}

.a11yw-step-btn {
	width: 32px;
	height: 32px;
	flex-shrink: 0;
	border: 1.5px solid #DADADA !important;
	border-radius: 8px;
	background: #ffffff !important;
	color: #000 !important;
	font-size: 18px;
	font-weight: 700;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.a11yw-step-btn:hover:not(:disabled),
.a11yw-step-btn:focus-visible:not(:disabled) {
	border-color: var(--a11yw-primary, #501045) !important;
	background: var(--a11yw-primary-light, #f4f0f3) !important;
}

.a11yw-step-btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.a11yw-step-value {
	flex: 1;
	text-align: center;
	font-size: 13px;
	font-weight: 600;
	color: #000 !important;
}

.a11yw-align-group {
	display: flex !important;
	align-items: stretch !important;
	gap: 8px;
}

.a11yw-align-btn {
	flex: 1;
	height: 32px;
	border: 1.5px solid #DADADA !important;
	border-radius: 8px;
	background: #ffffff !important;
	color: #000 !important;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.a11yw-align-btn:hover,
.a11yw-align-btn:focus-visible {
	border-color: #999999 !important;
	background: #f2f2f2 !important;
}

.a11yw-align-btn[aria-pressed="true"] {
	background: var(--a11yw-primary, #501045) !important;
	border-color: var(--a11yw-primary, #501045) !important;
	color: var(--a11yw-white) !important;
}

#a11yw-panel-footer {
	text-align: center;
	font-size: 11px;
	color: #8b8398;
	padding: 8px 0 14px;
}

/* =========================================================
   Effekte, die auf der ganzen Website angewendet werden
   ========================================================= */
html.a11yw-text-1 body { font-size: 110% !important; }
html.a11yw-text-2 body { font-size: 120% !important; }
html.a11yw-text-3 body { font-size: 130% !important; }
html.a11yw-text-4 body { font-size: 140% !important; }
html.a11yw-text-5 body { font-size: 150% !important; }

html.a11yw-line-height-1 body,
html.a11yw-line-height-1 body * { line-height: 1.5 !important; }
html.a11yw-line-height-2 body,
html.a11yw-line-height-2 body * { line-height: 1.75 !important; }
html.a11yw-line-height-3 body,
html.a11yw-line-height-3 body * { line-height: 2 !important; }
html.a11yw-line-height-4 body,
html.a11yw-line-height-4 body * { line-height: 2.25 !important; }

html.a11yw-align-left body * { text-align: left !important; }
html.a11yw-align-center body * { text-align: center !important; }
html.a11yw-align-right body * { text-align: right !important; }

html.a11yw-readable-font body,
html.a11yw-readable-font body * {
	font-family: Arial, Helvetica, sans-serif !important;
	letter-spacing: 0.01em !important;
}

html.a11yw-contrast body {
	background: #000 !important;
	color: #fff !important;
}
html.a11yw-contrast body * {
	background-color: #000 !important;
	color: #fff !important;
	border-color: #fff !important;
}
html.a11yw-contrast a,
html.a11yw-contrast a * {
	color: #ffd400 !important;
}

html.a11yw-grayscale body > *:not(#a11yw-root) { filter: grayscale(100%); }

html.a11yw-hide-images img,
html.a11yw-hide-images svg:not(#a11yw-root svg),
html.a11yw-hide-images video,
html.a11yw-hide-images [style*="background-image"] {
	visibility: hidden !important;
}

html.a11yw-pause-animations *,
html.a11yw-pause-animations *::before,
html.a11yw-pause-animations *::after {
	animation-play-state: paused !important;
	transition: none !important;
}

html.a11yw-highlight-focus *:focus {
	outline: 3px solid #ff6b00 !important;
	outline-offset: 2px !important;
}

html.a11yw-big-cursor,
html.a11yw-big-cursor * {
	cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 24 24"><path d="M4 2l14 8-6 2 4 8-3 1-4-8-5 5z" fill="black" stroke="white" stroke-width="1"/></svg>') 4 4, auto !important;
}

html.a11yw-highlight-links a {
	background: #ffe066 !important;
	color: #1a1a1a !important;
	text-decoration: underline !important;
	outline: 1px solid #1a1a1a;
}

#a11yw-reading-guide-bar {
	position: fixed;
	left: 0;
	width: 100%;
	height: 32px;
	background: rgba(255, 212, 0, 0.35);
	border-top: 2px solid #ffb800;
	border-bottom: 2px solid #ffb800;
	pointer-events: none;
	z-index: 999998;
	display: none;
}

html.a11yw-reading-guide #a11yw-reading-guide-bar {
	display: block;
}

@media (max-width: 480px) {
	#a11yw-root { bottom: 16px; }
	#a11yw-panel { width: calc(100vw - 32px); }
}
