/* ==========================================================================
   MSD BARRIEREFREIHEITS-WIDGET
   DSGVO-konform (localStorage, keine Cookies, keine externen Ressourcen)
   Marken-Design: Navy #0a1428 + Gold #c9a84c, Dark/Light via data-theme
   ========================================================================== */

/* --- Trigger-Button (schwebend) --- */
.msd-a11y-trigger {
	position: fixed;
	bottom: 6.5rem;            /* über dem Cookie-Button (links unten) */
	left: 2rem;
	z-index: 9990;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background: linear-gradient(135deg, #c9a84c, #e8c97a);
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 16px rgba(201,168,76,.4);
	transition: transform .25s, box-shadow .25s;
	padding: 0;
}
.msd-a11y-trigger:hover {
	transform: scale(1.1);
	box-shadow: 0 6px 22px rgba(201,168,76,.6);
}
.msd-a11y-trigger:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 2px;
}
.msd-a11y-trigger svg {
	width: 28px;
	height: 28px;
	color: #0a1428;
	fill: #0a1428;
}

/* --- Panel --- */
.msd-a11y-panel {
	position: fixed;
	bottom: 11rem;
	left: 2rem;
	z-index: 9991;
	width: 320px;
	max-width: calc(100vw - 4rem);
	max-height: 75vh;
	overflow-y: auto;
	background: #0d1e3a;
	border: 1px solid rgba(201,168,76,.25);
	border-radius: 16px;
	box-shadow: 0 12px 48px rgba(0,0,0,.5);
	padding: 1.4rem;
	opacity: 0;
	visibility: hidden;
	transform: translateY(20px) scale(.96);
	transition: opacity .25s, transform .25s, visibility .25s;
}
.msd-a11y-panel.is-open {
	opacity: 1;
	visibility: visible;
	transform: translateY(0) scale(1);
}

.msd-a11y-panel__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 1.1rem;
	padding-bottom: .8rem;
	border-bottom: 1px solid rgba(201,168,76,.15);
}
.msd-a11y-panel__title {
	font-family: 'Cormorant Garamond', Georgia, serif;
	font-size: 1.35rem;
	color: #f5f0e8;
	margin: 0;
	font-weight: 500;
}
.msd-a11y-panel__close {
	background: none;
	border: none;
	color: rgba(245,240,232,.6);
	cursor: pointer;
	font-size: 1.5rem;
	line-height: 1;
	padding: .2rem .5rem;
	border-radius: 6px;
	transition: color .2s, background .2s;
}
.msd-a11y-panel__close:hover {
	color: #e8c97a;
	background: rgba(201,168,76,.1);
}

/* --- Font-Size-Stufen-Anzeige --- */
.msd-a11y-fontsize {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: .6rem;
	background: rgba(255,255,255,.04);
	border: 1px solid rgba(201,168,76,.15);
	border-radius: 10px;
	padding: .7rem .9rem;
	margin-bottom: 1rem;
}
.msd-a11y-fontsize__label {
	color: rgba(245,240,232,.8);
	font-family: 'Outfit', sans-serif;
	font-size: .9rem;
}
.msd-a11y-fontsize__controls { display: flex; align-items: center; gap: .5rem; }
.msd-a11y-fontsize__btn {
	width: 30px; height: 30px;
	border-radius: 8px;
	border: 1px solid rgba(201,168,76,.3);
	background: rgba(201,168,76,.08);
	color: #e8c97a;
	font-size: 1.1rem;
	font-weight: 700;
	cursor: pointer;
	display: flex; align-items: center; justify-content: center;
	transition: background .2s;
}
.msd-a11y-fontsize__btn:hover { background: rgba(201,168,76,.2); }
.msd-a11y-fontsize__level {
	color: #e8c97a;
	font-weight: 700;
	min-width: 28px;
	text-align: center;
	font-family: 'Outfit', sans-serif;
}

/* --- Toggle-Optionen --- */
.msd-a11y-option {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: .8rem;
	padding: .65rem 0;
	border-bottom: 1px solid rgba(255,255,255,.05);
}
.msd-a11y-option:last-child { border-bottom: none; }
.msd-a11y-option__label {
	color: rgba(245,240,232,.85);
	font-family: 'Outfit', sans-serif;
	font-size: .92rem;
	cursor: pointer;
	flex: 1;
}

/* Toggle-Switch */
.msd-a11y-switch {
	position: relative;
	width: 46px;
	height: 26px;
	flex-shrink: 0;
}
.msd-a11y-switch input {
	position: absolute;
	opacity: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	cursor: pointer;
	z-index: 2;
}
.msd-a11y-switch__slider {
	position: absolute;
	inset: 0;
	background: rgba(255,255,255,.15);
	border-radius: 50px;
	transition: background .25s;
	pointer-events: none;
}
.msd-a11y-switch__slider::before {
	content: '';
	position: absolute;
	width: 20px; height: 20px;
	left: 3px; top: 3px;
	background: #f5f0e8;
	border-radius: 50%;
	transition: transform .25s;
}
.msd-a11y-switch input:checked + .msd-a11y-switch__slider {
	background: linear-gradient(135deg, #c9a84c, #e8c97a);
}
.msd-a11y-switch input:checked + .msd-a11y-switch__slider::before {
	transform: translateX(20px);
	background: #0a1428;
}
.msd-a11y-switch input:focus-visible + .msd-a11y-switch__slider {
	outline: 2px solid #e8c97a;
	outline-offset: 2px;
}

/* --- Reset-Button --- */
.msd-a11y-reset {
	width: 100%;
	margin-top: 1rem;
	padding: .7rem;
	background: transparent;
	border: 1px solid rgba(201,168,76,.4);
	border-radius: 10px;
	color: #c9a84c;
	font-family: 'Outfit', sans-serif;
	font-weight: 600;
	cursor: pointer;
	transition: background .2s, color .2s;
}
.msd-a11y-reset:hover {
	background: rgba(201,168,76,.12);
	color: #e8c97a;
}

/* ==========================================================================
   AKTIVE BARRIEREFREIHEITS-MODI (am <html>/<body>)
   ========================================================================== */

/* Schriftgröße — 3 Stufen */
html.msd-a11y-font-1 { font-size: 112.5%; }
html.msd-a11y-font-2 { font-size: 125%; }
html.msd-a11y-font-3 { font-size: 140%; }

/* Hoher Kontrast */
html.msd-a11y-contrast body *:not(.msd-a11y-trigger):not(.msd-a11y-trigger *):not(.msd-a11y-panel):not(.msd-a11y-panel *):not(img):not(svg):not(svg *) {
	background-color: #000 !important;
	color: #fff !important;
	border-color: #fff !important;
}
html.msd-a11y-contrast a:not(.msd-a11y-trigger):not(.msd-a11y-panel *) { color: #ffff00 !important; }

/* Links unterstreichen */
html.msd-a11y-underline a:not(.msd-a11y-trigger):not(.msd-a11y-panel *) {
	text-decoration: underline !important;
	text-underline-offset: 2px;
}

/* Lesbare Schrift (Dyslexie-freundlich) */
html.msd-a11y-readable body *:not(.msd-a11y-panel__title) {
	font-family: 'Outfit', Verdana, Arial, sans-serif !important;
	letter-spacing: .03em !important;
	line-height: 1.8 !important;
	word-spacing: .1em !important;
}

/* Animationen pausieren */
html.msd-a11y-no-motion *,
html.msd-a11y-no-motion *::before,
html.msd-a11y-no-motion *::after {
	animation-duration: 0s !important;
	animation-iteration-count: 1 !important;
	transition-duration: 0s !important;
	scroll-behavior: auto !important;
}

/* Großer Cursor */
html.msd-a11y-big-cursor,
html.msd-a11y-big-cursor * {
	cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cpath fill='%23c9a84c' stroke='%23000' stroke-width='1.5' d='M8 4l28 16-12 3-3 12z'/%3E%3C/svg%3E") 8 4, auto !important;
}

/* Lesehilfe (horizontale Linie folgt der Maus) */
.msd-a11y-reading-guide {
	position: fixed;
	left: 0;
	width: 100%;
	height: 40px;
	background: rgba(201,168,76,.12);
	border-top: 2px solid #c9a84c;
	border-bottom: 2px solid #c9a84c;
	pointer-events: none;
	z-index: 99999;
	display: none;
}
html.msd-a11y-reading-guide-on .msd-a11y-reading-guide { display: block; }

/* ==========================================================================
   LIGHT MODE
   ========================================================================== */
[data-theme="light"] .msd-a11y-panel {
	background: #fff;
	border-color: rgba(156,125,46,.25);
}
[data-theme="light"] .msd-a11y-panel__title { color: #16203a; }
[data-theme="light"] .msd-a11y-panel__close { color: rgba(22,32,58,.5); }
[data-theme="light"] .msd-a11y-fontsize {
	background: rgba(0,0,0,.03);
	border-color: rgba(156,125,46,.18);
}
[data-theme="light"] .msd-a11y-fontsize__label { color: rgba(22,32,58,.8); }
[data-theme="light"] .msd-a11y-fontsize__btn,
[data-theme="light"] .msd-a11y-fontsize__level { color: #9c7d2e; }
[data-theme="light"] .msd-a11y-option__label { color: rgba(22,32,58,.85); }
[data-theme="light"] .msd-a11y-option { border-bottom-color: rgba(0,0,0,.06); }
[data-theme="light"] .msd-a11y-switch__slider { background: rgba(0,0,0,.2); }
[data-theme="light"] .msd-a11y-reset { color: #9c7d2e; border-color: rgba(156,125,46,.4); }

/* Mobile */
@media (max-width: 600px) {
	.msd-a11y-trigger { width: 46px; height: 46px; bottom: 6rem; left: 1.5rem; }
	.msd-a11y-panel { bottom: 10.5rem; left: 1.5rem; right: 1.5rem; width: auto; }
}

@media (prefers-reduced-motion: reduce) {
	.msd-a11y-trigger, .msd-a11y-panel { transition: none; }
}
