/* Haupt-Variablen */
:root {
	--widget-bg-color: #0055d4;
	--widget-icon-color: #ffffff;
	--widget-panel-bg: #ffffff;
	--widget-panel-text: #333333;
	--widget-panel-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* ---------------------------------- */
/* Widget-Trigger-Button              */
/* ---------------------------------- */
button[aria-label="Accessibility Menu"].mwd-bat-trigger {
	position: fixed !important;
	z-index: 999999;
	width: 50px;
	height: 50px;
	background-color: var(--widget-bg-color);
	border: none;
	border-radius: 50%;
	box-shadow: var(--widget-panel-shadow);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	transition: all 0.2s ease-in-out; /* Geändert für sanfteren Farbwechsel */
	visibility: visible;
	opacity: 1;
}

button[aria-label="Accessibility Menu"].mwd-bat-trigger:hover {
	transform: scale(1.1);
}

button[aria-label="Accessibility Menu"].mwd-bat-trigger.pos-bottom-right { bottom: 20px; right: 20px; }
button[aria-label="Accessibility Menu"].mwd-bat-trigger.pos-bottom-left  { bottom: 20px; left: 20px; }
button[aria-label="Accessibility Menu"].mwd-bat-trigger.pos-top-right   { top: 20px; right: 20px; }
button[aria-label="Accessibility Menu"].mwd-bat-trigger.pos-top-left    { top: 20px; left: 20px; }

button[aria-label="Accessibility Menu"].mwd-bat-trigger svg {
	width: 28px;
	height: 28px;
	fill: var(--widget-icon-color);
    transition: fill 0.2s ease-in-out; /* Geändert für sanfteren Farbwechsel */
}


/* ---------------------------------- */
/* Widget-Panel                       */
/* ---------------------------------- */
div[role="dialog"].mwd-bat-panel {
	position: fixed !important;
	z-index: 999998;
	width: 300px;
	max-width: 90vw;
	max-height: 80vh;
	background-color: var(--widget-panel-bg);
	border-radius: 8px;
	box-shadow: var(--widget-panel-shadow);
	overflow-y: auto;
	padding: 20px;
	visibility: hidden;
	opacity: 0;
	transform: scale(0.95);
	transition: all 0.2s ease-in-out;
}

div[role="dialog"].mwd-bat-panel.is-open {
	visibility: visible;
	opacity: 1;
	transform: scale(1);
}

div[role="dialog"].mwd-bat-panel.pos-bottom-right { bottom: 80px; right: 20px; }
div[role="dialog"].mwd-bat-panel.pos-bottom-left  { bottom: 80px; left: 20px; }
div[role="dialog"].mwd-bat-panel.pos-top-right   { top: 80px; right: 20px; }
div[role="dialog"].mwd-bat-panel.pos-top-left    { top: 80px; left: 20px; }

.mwd-bat-panel-header {
	padding-bottom: 15px;
	margin-bottom: 15px;
	border-bottom: 1px solid #eee;
}

.mwd-bat-panel-title {
	margin: 0;
	font-size: 18px;
	color: var(--widget-panel-text);
}

.mwd-bat-feature {
	margin-bottom: 20px;
}

.mwd-bat-feature-title {
	font-size: 14px;
	margin: 0 0 10px 0;
	color: #555;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.mwd-bat-btn-group {
	display: flex;
	gap: 5px;
}

.mwd-bat-btn-group button,
.mwd-bat-reset-btn {
	flex: 1;
	padding: 8px 5px;
	border: 1px solid #ccc;
	background-color: #f9f9f9;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
	transition: background-color 0.2s, border-color 0.2s;
}

.mwd-bat-btn-group button:hover {
	background-color: #eee;
	border-color: #999;
	color: #163db1;
}

.mwd-bat-reset-btn {
	width: 100%;
	background-color: #e9e9e9;
}

/* -- BARRIEREFREIHEITS-REGELN -- */
body.mwd-text-size-1,
body.mwd-text-size-1 button,
body.mwd-text-size-1 p,
body.mwd-text-size-1 a,
body.mwd-text-size-1 h1,
body.mwd-text-size-1 h2,
body.mwd-text-size-1 h3,
body.mwd-text-size-1 h4,
body.mwd-text-size-1 h5,
body.mwd-text-size-1 h6{ font-size: 115%; }
body.mwd-text-size-2,
body.mwd-text-size-2 button,
body.mwd-text-size-2 p,
body.mwd-text-size-2 a,
body.mwd-text-size-2 h1,
body.mwd-text-size-2 h2,
body.mwd-text-size-2 h3,
body.mwd-text-size-2 h4,
body.mwd-text-size-2 h5,
 body.mwd-text-size-2 h6{ font-size: 130%; }
body.mwd-text-size-3,
body.mwd-text-size-3 button,
body.mwd-text-size-3 p,
body.mwd-text-size-3 a,
body.mwd-text-size-3 h1,
body.mwd-text-size-3 h2,
body.mwd-text-size-3 h3,
body.mwd-text-size-3 h4,
body.mwd-text-size-3 h5,
body.mwd-text-size-3 h6 { font-size: 145%; }
body.mwd-text-size-4,
body.mwd-text-size-4 button,
body.mwd-text-size-4 p,
body.mwd-text-size-4 a,
body.mwd-text-size-4 h1,
body.mwd-text-size-4 h2,
body.mwd-text-size-4 h3,
body.mwd-text-size-4 h4,
body.mwd-text-size-4 h5,
body.mwd-text-size-4 h6 { font-size: 160%; }
body.mwd-text-size-5,
body.mwd-text-size-5 button,
body.mwd-text-size-5 p,
body.mwd-text-size-5 a,
body.mwd-text-size-5 h1,
body.mwd-text-size-5 h2,
body.mwd-text-size-5 h3,
body.mwd-text-size-5 h4,
body.mwd-text-size-5 h5,
body.mwd-text-size-5 h6 { font-size: 175%; }

body.mwd-larger-spacing p,
body.mwd-larger-spacing li,
body.mwd-larger-spacing a,
body.mwd-larger-spacing span,
body.mwd-larger-spacing td,
body.mwd-larger-spacing div {
    line-height: 1.8 !important;
    letter-spacing: 0.05em !important;
}

body.mwd-dyslexia-font,
body.mwd-dyslexia-font button,
body.mwd-dyslexia-font p,
body.mwd-dyslexia-font a,
body.mwd-dyslexia-font h1,
body.mwd-dyslexia-font h2,
body.mwd-dyslexia-font h3,
body.mwd-dyslexia-font h4,
body.mwd-dyslexia-font h5,
body.mwd-dyslexia-font h6  {
    font-family: 'OpenDyslexic', sans-serif !important;
}

/* KONTRAST-REGELN */
body.mwd-contrast-dark,
body.mwd-contrast-dark .mwd-bat-panel {
	background-color: #1a1a1a !important;
	color: #f0f0f0 !important;
}
body.mwd-contrast-light,
body.mwd-contrast-dark .mwd-bat-panel {
	background-color: #f5f5f5 !important;
	color: #000000 !important;
}
body.mwd-contrast-dark div,
body.mwd-contrast-dark main,
body.mwd-contrast-dark section,
body.mwd-contrast-dark article,
body.mwd-contrast-dark header,
body.mwd-contrast-dark footer,
body.mwd-contrast-light div,
body.mwd-contrast-light main,
body.mwd-contrast-light section,
body.mwd-contrast-light article,
body.mwd-contrast-light header,
body.mwd-contrast-light footer {
	background: transparent !important;
	color: inherit !important;
}
body.mwd-contrast-dark a {
	color: #58c2ff !important;
}
body.mwd-contrast-light a {
	color: #0055d4 !important;
}
body.mwd-contrast-inverted {
	background-color: #000 !important;
}
body.mwd-contrast-inverted > *:not(.mwd-bat-trigger):not(.mwd-bat-panel) {
	filter: invert(100%) hue-rotate(180deg);
}

/* INTERAKTIONS-REGELN */

/* 1. Links hervorheben (stärkere Regel) */
/* *** HIER IST DIE KORREKTUR: `:not(.mwd-bat-trigger)` wurde entfernt *** */
body.mwd-highlight-links.mwd-highlight-links a,
body.mwd-highlight-links.mwd-highlight-links button,
body.mwd-highlight-links.mwd-highlight-links .wp-block-button__link,
body.mwd-highlight-links.mwd-highlight-links input[type="submit"],
body.mwd-highlight-links.mwd-highlight-links input[type="button"] {
    background-color: yellow !important;
    color: black !important;
    text-decoration: underline !important;
    border: 2px solid black !important;
    border-radius: 4px;
}

/* 2. Icon-Farbe anpassen, wenn Links hervorgehoben sind */
body.mwd-highlight-links button[aria-label="Accessibility Menu"].mwd-bat-trigger svg {
    fill: #000000 !important;
}

/* 3. Animationen stoppen */
body.mwd-stop-animations *,
body.mwd-stop-animations *::before,
body.mwd-stop-animations *::after {
    animation-duration: 0s !important;
    animation-delay: 0s !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
}

/* 4. Bilder ausblenden (mit Platzhalter) */
body.mwd-hide-images img,
body.mwd-hide-images picture,
body.mwd-hide-images figure {
    position: relative;
    background-color: #e0e0e0;
}
body.mwd-hide-images img,
body.mwd-hide-images [style*="background-image"] {
    visibility: hidden !important;
    opacity: 0 !important;
}
body.mwd-hide-images figure::before,
body.mwd-hide-images picture::before,
body.mwd-hide-images img::before {
    content: 'Bild';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
}