/* A11y Fixes for Elementor - statische Regeln.
   Jede Regel haengt an einer Body-Klasse a11y4e-m-<modul>; ist das Modul aus,
   greift die Regel nicht. Farben kommen als Variablen aus dem Elementor-Kit:
   --a11y4e-focus, --a11y4e-halo, --a11y4e-skip-bg, --a11y4e-skip-fg */

/* ---------- Screenreader-Texte (1.3.1) ----------
   Manche Themes/Plugins setzen .screen-reader-text{display:none!important} und
   loeschen damit Sprunglink und alle reinen Screenreader-Texte. */
body.a11y4e-m-sr-text-restore .screen-reader-text:not(:focus),
body.a11y4e-m-sr-text-restore .sr-only:not(:focus),
body.a11y4e-m-sr-text-restore .elementor-screen-only:not(:focus){
	position:absolute !important;display:block !important;width:1px !important;height:1px !important;
	margin:-1px !important;padding:0 !important;overflow:hidden !important;
	clip:rect(0 0 0 0) !important;clip-path:inset(50%) !important;white-space:nowrap !important;border:0 !important;
}

/* ---------- Sprunglink (2.4.1) ----------
   Unsichtbar, bis er per Tab fokussiert wird - dann gut lesbar oben links. */
body.a11y4e-m-skip-link .skip-link:focus,
body.a11y4e-m-skip-link .skip-link:focus-visible{
	position:fixed !important;top:calc(12px + var(--wp-admin--admin-bar--height, 0px)) !important;left:12px !important;z-index:100000 !important;
	display:block !important;width:auto !important;height:auto !important;margin:0 !important;
	padding:14px 22px !important;overflow:visible !important;clip:auto !important;clip-path:none !important;
	white-space:normal !important;background:var(--a11y4e-skip-bg,#1A1A1A) !important;color:var(--a11y4e-skip-fg,#FFF) !important;
	font-size:16px !important;font-weight:700 !important;line-height:1.3 !important;text-decoration:none !important;
	border-radius:6px !important;box-shadow:0 6px 24px rgba(0,0,0,.35) !important;
}

/* ---------- Sichtbarer Fokus (2.4.7, 1.4.11) ----------
   Doppelter Ring: Kit-Farbe aussen, Hof (weiss oder fast schwarz) in der Luecke.
   So bleibt der Ring auf hellen und dunklen Flaechen sichtbar. */
body.a11y4e-m-focus-ring :is(a,button,input,select,textarea,summary,[tabindex],[contenteditable="true"],.elementor-button,.elementor-menu-toggle,.e-n-menu-title,.e-n-tab-title,.elementor-tab-title,.e-n-accordion-item-title):focus-visible{
	outline:3px solid var(--a11y4e-focus,#1A1A1A) !important;
	outline-offset:2px !important;
	box-shadow:0 0 0 5px var(--a11y4e-halo,#FFF) !important;
}
/* Mausklicks sollen keinen Ring hinterlassen. */
body.a11y4e-m-focus-ring :is(a,button,input,select,textarea,summary,[tabindex]):focus:not(:focus-visible){outline:none}
/* Der Hauptbereich ist nur Sprungziel, kein Bedienelement. */
body main.a11y4e-main:focus,
body main#content:focus,
body main[tabindex="-1"]:focus{outline:none !important;box-shadow:none !important}

/* ---------- Formulare (1.4.3) ----------
   Einwilligungs-Links und Pflichtfeld-Hinweise erben die Textfarbe ihres Labels;
   fest gesetzte Farben gehen auf hellen oder dunklen Formularkarten schief. */
body.a11y4e-m-form-fixes .gfield--type-consent a,
body.a11y4e-m-form-fixes .ginput_container_consent a,
body.a11y4e-m-form-fixes .elementor-field-type-acceptance a,
body.a11y4e-m-form-fixes .elementor-field-subgroup a{color:inherit !important;text-decoration:underline !important}
body.a11y4e-m-form-fixes .gform_wrapper .gfield_required,
body.a11y4e-m-form-fixes .gform_wrapper .gfield_required_text,
body.a11y4e-m-form-fixes .elementor-field-label .elementor-mark-required{color:inherit !important}
/* Hinweis fuer den Formular-Editor, im Frontend ueberfluessig. */
body.a11y4e-m-form-fixes .gform_wrapper .admin-hidden-markup{display:none !important}
/* Platzhalter duerfen nicht zu blass sein (Elementor-Standard ist oft < 4,5:1). */
body.a11y4e-m-form-fixes .elementor-field-group .elementor-field::placeholder,
body.a11y4e-m-form-fixes .gform_wrapper ::placeholder{opacity:1;color:color-mix(in srgb,currentColor 70%,transparent)}

/* ---------- Bewegung reduzieren (2.3.3) ---------- */
@media (prefers-reduced-motion: reduce){
	html:has(body.a11y4e-m-reduced-motion){scroll-behavior:auto !important}
	body.a11y4e-m-reduced-motion .elementor-invisible{visibility:visible !important}
	body.a11y4e-m-reduced-motion .animated,
	body.a11y4e-m-reduced-motion [class*="elementor-animation-"],
	body.a11y4e-m-reduced-motion .elementor-motion-effects-element,
	body.a11y4e-m-reduced-motion .elementor-motion-effects-layer{
		animation:none !important;transition:none !important;transform:none !important;
	}
	body.a11y4e-m-reduced-motion *,
	body.a11y4e-m-reduced-motion *::before,
	body.a11y4e-m-reduced-motion *::after{
		animation-duration:.01ms !important;animation-iteration-count:1 !important;
		transition-duration:.01ms !important;scroll-behavior:auto !important;
	}
}
