/* ===== FAB & Toolbar ===== */
.wah-fab {
  background: transparent !important;
  border: 0 !important;
  border-radius: 50%;
  cursor: pointer !important;
  padding: 0 !important;
  box-shadow: none !important;
}

.wah-fab {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 2147483646;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 0 !important;
  background: transparent !important;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: none !important;
  transition: transform .06s ease;
  border-radius:50% !important;
}
.wah-fab:hover{
  box-shadow: none !important;
}
.wah-fab-ico{ width:100%; height:100%; object-fit:contain; line-height:1; display:block; background:transparent !important; border:0 !important; box-shadow:none !important; border-radius:50%; }
.wah-toolbar{ position:fixed; right:0rem; bottom:0rem; display:flex; flex-direction:column; z-index:2147483650; background:var(--wah-toolbar-bg,#0b1220); color:var(--wah-toolbar-text,#e5e7eb); border:3px solid var(--wah-toolbar-border,#1985CF); border-right:none; border-top-left-radius:8px; border-bottom-left-radius:8px; box-shadow:0 24px 48px rgba(0,0,0,.26); overflow:hidden; padding:10px; transform:translateX(105%); visibility:hidden; pointer-events:none; transition:transform .28s ease; will-change:transform;}
.wah-toolbar[hidden]{ display:none; }
.wah-toolbar.wah-toolbar-open{ transform:translateX(0); visibility:visible; pointer-events:auto; }
.wah-toolbar.wah-toolbar-closing{ visibility:visible; pointer-events:none; }
#wah-toolbar:focus, #wah-toolbar:focus-visible{ outline:none !important; }
@media (prefers-reduced-motion: reduce){ .wah-toolbar{ transition:none; } }
.wah-toolbar-header, .wah-toolbar-footer{ flex:0 0 auto; position: sticky; background: inherit; z-index: 2; padding-bottom:20px;}
.wah-toolbar-header{ top:0; display:flex; align-items:center; justify-content:flex-start; padding:1rem; border-bottom:0;}
.wah-toolbar-heading{ display:flex; flex-direction:column; align-items:flex-start; min-width:0; }
#wah-toolbar .wah-toolbar-heading h2{ margin:0; line-height:1.25; }
#wah-toolbar .wah-toolbar-subtitle{ margin:.25rem 0 0; font-size:.75rem !important; line-height:1.4 !important; font-weight:400 !important; color:inherit; }
#wah-toolbar .wah-header-actions{ margin-left:auto; }
.wah-toolbar-body{ flex:1 1 auto; overflow:auto; padding:.5rem; }
.wah-toolbar-body section{ border:0px solid var(--wah-section-border,#fff); border-radius:0px; padding:.75rem; margin-bottom:1.75rem; background:var(--wah-section-bg,transparent); }
/* Section headings: larger and normal weight (force override) */
#wah-toolbar .wah-toolbar-body h3{ margin:0 0 .5rem; font-size:1.45rem !important; font-weight:400 !important; display: flex; align-items: center; }
#wah-toolbar .wah-toolbar-body h3#wah-seheinschraenkungen::before {content:''; background-image: url("../img/wah-seheinschraenkungen-icon.webp"); background-size: cover; margin-right: 10px; }
#wah-toolbar .wah-toolbar-body h3#wah-kognitive-unterstuetzung::before {content:''; background-image: url("../img/wah-kognitive-unterstuetzung-icon.webp"); background-size: cover; margin-right: 10px; }
#wah-toolbar .wah-toolbar-body h3#wah-neigung-krampfanfaelle::before {content:''; background-image: url("../img/wah-neigung-krampfanfaelle-icon.webp"); background-size: cover; margin-right: 10px; }
#wah-toolbar .wah-toolbar-body h3#wah-konzentration::before {content:''; background-image: url("../img/wah-konzentration-icon.webp"); background-size: cover; margin-right: 10px; }
#wah-toolbar .wah-toolbar-body h3#wah-screenreader-tastatur::before {content:''; background-image: url("../img/wah-screenreader-tastatur-icon.webp"); background-size: cover; margin-right: 10px; }
#wah-toolbar .wah-toolbar-body h3#wah-kontrast::before {content:''; background-image: url("../img/wah-kontrast-icon.webp"); background-size: cover; margin-right: 10px; }

@media (max-width: 1279px){
#wah-toolbar .wah-toolbar-body h3#wah-seheinschraenkungen::before,
#wah-toolbar .wah-toolbar-body h3#wah-kognitive-unterstuetzung::before,
#wah-toolbar .wah-toolbar-body h3#wah-neigung-krampfanfaelle::before,
#wah-toolbar .wah-toolbar-body h3#wah-konzentration::before,
#wah-toolbar .wah-toolbar-body h3#wah-screenreader-tastatur::before,
#wah-toolbar .wah-toolbar-body h3#wah-kontrast::before {
  width:30px;
  height:30px;
}
}

@media (min-width: 1280px){
  #wah-toolbar .wah-toolbar-body h3#wah-seheinschraenkungen::before,
  #wah-toolbar .wah-toolbar-body h3#wah-kognitive-unterstuetzung::before,
  #wah-toolbar .wah-toolbar-body h3#wah-neigung-krampfanfaelle::before,
  #wah-toolbar .wah-toolbar-body h3#wah-konzentration::before,
  #wah-toolbar .wah-toolbar-body h3#wah-screenreader-tastatur::before,
  #wah-toolbar .wah-toolbar-body h3#wah-kontrast::before {
    width:50px;
    height:50px;
  }
  }

.wah-toolbar-body label{ display:block; margin:.25rem 0; font-size:.95rem; }
.wah-toolbar-body input[type="range"]{ width:100%; }
.wah-toolbar-footer{ bottom:0; padding:.5rem; display:flex; gap:.5rem; justify-content:space-between; padding-top:20px; border-top:0;}
#wah-close { background:var(--wah-primary-bg,#1985CF); color:var(--wah-primary-text,#fff); border-color:var(--wah-primary-border,#1985CF); padding:15px; text-transform:none; font-weight:bold;}
#wah-close:hover{background:var(--wah-primary-bg-hover,var(--wah-primary-bg,#1985CF)); color:var(--wah-primary-text-hover,var(--wah-primary-text,#fff)); border-color:var(--wah-primary-border-hover,var(--wah-primary-border,#1985CF));}
.wah-btn {
  background:var(--wah-primary-bg,#1985CF);
  color:var(--wah-primary-text,#fff);
  border:0px solid var(--wah-primary-border,#374151);
  padding:.4rem .7rem;
  border-radius:4px;
  cursor:pointer;
}
.wah-btn.danger {
  background:var(--wah-danger-bg,#FD8839);
  color:var(--wah-danger-text,#fff);
  border-color:var(--wah-danger-border,#FD8839);
  margin:0 auto;
  padding:15px;
  width:100%;
  text-align:center;
  text-transform:none;
  font-weight:bold;
}
.wah-btn.danger:hover {
  background:var(--wah-danger-bg-hover,var(--wah-danger-bg,#FD8839));
  color:var(--wah-danger-text-hover,var(--wah-danger-text,#fff));
  border-color:var(--wah-danger-border-hover,var(--wah-danger-border,#FD8839));
}

#wah-toolbar input[type="radio"] {accent-color:var(--md-primary,#1985cf); width:20px; height:20px;}

#wah-toolbar input[type='checkbox']{
  -webkit-appearance: inherit !important;
  background:var(--wah-control-bg,#fff);
  border:2px solid var(--wah-control-border,#222);
  box-sizing: border-box;
  padding: 0;
  text-align: center;
  vertical-align: middle;
  width: 26px !important;
  height: 26px !important;
  appearance:none;
  border-radius:10%;
  box-shadow: none;
  font-size: 1em;
}

#wah-toolbar input[type='checkbox']:checked {
  background-color:var(--md-chip-sel,#FD8839);
}

#wah-toolbar input[type='checkbox']:checked:after {
  content: '\2713';
  color:#fff;
}

/* Lock toolbar typography baseline, but allow targeted overrides (like h3 above) */
#wah-toolbar{ font-size:16px !important; line-height:1.4 !important; }
#wah-toolbar *{ word-spacing:normal !important; letter-spacing:normal !important; scrollbar-color:var(--md-primary,#1985CF) var(--md-track,#2e3142) !important;}

/* ===== Light theme ===== */
.wah-toolbar[data-theme="light"]{ background:var(--wah-toolbar-bg,#ffffff); color:var(--wah-toolbar-text,#111827); border-color:var(--wah-toolbar-border,#e5e7eb); }
.wah-toolbar[data-theme="light"] .wah-btn { background:var(--wah-primary-bg,#1985CF); color:var(--wah-primary-text,#fff); border-color:var(--wah-primary-border,#374151); }
.wah-toolbar[data-theme="light"] .wah-btn.danger { background:var(--wah-danger-bg,#FD8839); color:var(--wah-danger-text,#fff); border-color:var(--wah-danger-border,#FD8839); }
.wah-toolbar[data-theme="light"] section{ border-color:var(--wah-section-border,#000) !important; }

/* ===== Toolbar headings per theme ===== */
.wah-toolbar[data-theme="dark"] h2, .wah-toolbar[data-theme="dark"] h3{ color:var(--wah-heading-color,#ffffff); }
.wah-toolbar[data-theme="light"] h2, .wah-toolbar[data-theme="light"] h3{ color:var(--wah-heading-color,#333333); }

/* ===== Range styling per theme ===== */
#wah-toolbar input[type="range"]{ -webkit-appearance:none; appearance:none; height:4px; border-radius:2px; background:var(--md-track,#2b2b2b); }
#wah-toolbar input[type="range"]::-webkit-slider-thumb{ -webkit-appearance:none; appearance:none; width:16px; height:16px; border-radius:999px; border:none; background:var(--md-thumb,#ffffff); } /* base default thumb */
#wah-toolbar input[type="range"]::-moz-range-thumb{ width:16px; height:16px; border-radius:999px; border:none; background:var(--md-thumb,#ffffff); }
#wah-toolbar input[type="range"]::-moz-range-track{ height:4px; background:var(--md-track,#2b2b2b); border:none; }

/* Light theme: track #666, thumb black (override with !important) */
#wah-toolbar[data-theme="light"] input[type="range"]{ background:var(--md-track,#666666); }
#wah-toolbar[data-theme="light"] input[type="range"]::-webkit-slider-thumb{ background:var(--md-thumb,#000000) !important; }
#wah-toolbar[data-theme="light"] input[type="range"]::-moz-range-thumb{ background:var(--md-thumb,#000000) !important; }
#wah-toolbar[data-theme="light"] input[type="range"]::-moz-range-track{ background:var(--md-track,#666666); }

/* ===== Inline layout helpers ===== */
.wah-inline{ display:flex; align-items:center; gap:.5rem; flex-wrap:wrap; }
.wah-link-color{ display:flex; align-items:center; gap:.5rem; flex-wrap:wrap; }
.wah-color-swatch{ display:flex; align-items:center; gap:.35rem; padding:.2rem .4rem; cursor:pointer; }
.wah-color-swatch input{ margin:0 4px 0 0; }
.wah-color-swatch i {
  display: inline-block;
  width: 20px;
  height: 20px;
  border-radius: 3px;
  border: 1px solid rgba(0,0,0,.25);
  margin-right: 5px;
}

/* ===== Compact contrast swatches ===== */
.wah-contrast-row{ display:flex; gap:.4rem; flex-wrap:wrap; }
.wah-contrast-swatch{
  display:flex; background:var(--md-primary,#1985CF) !important; align-items:center; gap:4px; padding:10px; border-radius:4px; border:1px solid var(--md-outline,#374151);
  color:var(--wah-primary-text,#fff); font-size:12px; line-height:1; cursor:pointer; margin-bottom:10px;
}
.wah-contrast-swatch i{ width:20px; height:20px; display:inline-block; }
.wah-contrast-swatch span{ font-weight:600; letter-spacing:.2px; }
.wah-contrast-swatch.is-active{ box-shadow:0 0 0 2px var(--md-chip-sel,#FD8839);}
.wah-toolbar[data-theme="light"] .wah-contrast-swatch{ background:var(--md-chip-bg,#f3f4f6) !important; color:var(--md-subtext,#111827); border-color:var(--md-outline,#e5e7eb); }
.wah-toolbar[data-theme="light"] .wah-contrast-swatch.is-active{ box-shadow:0 0 0 2px var(--md-chip-sel,#93c5fd) inset; border-color:var(--md-chip-sel,#93c5fd); }

.wah-contrast-tip{
  margin:2px 0 0;
  color:var(--md-subtext,#e5e7eb);
  font-size:12px;
  line-height:1.45;
}
.wah-contrast-tip strong{ color:inherit; font-weight:700; }

/* ===== Content adjustments: now gated by .wah-typo-active to avoid initial overrides ===== */
html.wah-typo-active [data-wah-reader-target] :is(p, li, a, small, strong, em, blockquote, dd, dt, code, pre, button, input, select, textarea, label, figcaption, td, th, h1, h2, h3, h4, h5, h6)
{ line-height: var(--wah-line-height) !important; word-spacing: var(--wah-word-spacing) !important; letter-spacing: var(--wah-letter-spacing) !important; }
html.wah-typo-active [data-wah-reader-target] li::marker{ font-size: 1em !important; line-height: var(--wah-line-height) !important; }


/* ===== Focusbar overlay (horizontal band) ===== */
.wah-overlays{ position: fixed; inset: 0; pointer-events:none; z-index: 2147483644; }
.wah-focusbar{ position: absolute; inset:0; display:none; }
html.wah-spotlight-on .wah-focusbar{ display:block; }
.wah-focusbar::before,
.wah-focusbar::after{ content:""; position:absolute; left:0; right:0; background:rgba(0,0,0,.85); }
.wah-focusbar::before{ top:0; height:var(--wah-bar-top, 40%); }
.wah-focusbar::after{ top:var(--wah-bar-bottom, 60%); bottom:0; }

/* ===== Magnifier lens ===== */
.wah-lens{ position: fixed; width: var(--wah-lens-d,220px); height: var(--wah-lens-d,220px);
  left: calc(var(--wah-lens-x, 50%) - var(--wah-lens-d,220px)/2);
  top: calc(var(--wah-lens-y, 50%) - var(--wah-lens-d,220px)/2);
  border-radius: 999px; border:2px solid #fff; box-shadow: 0 0 0 4px rgba(0,0,0,.35);
  overflow: hidden; display:none; pointer-events:none; z-index: 2147483645;
}
.wah-lens-inner{ position:absolute; top:0; left:0; transform-origin:0 0; will-change: transform; }
html.wah-magnifier-on .wah-lens{ display:block; }

/* ===== Cursor highlighter ===== */
.wah-cursor{ position:fixed; width:44px; height:44px; left:0; top:0;
  transform: translate(calc(var(--wah-cursor-x, -100px) - 50%), calc(var(--wah-cursor-y, -100px) - 50%));
  border:6px solid #fff; border-radius:999px; box-shadow:0 0 0 6px rgba(0,0,0,1), 0 0 12px rgba(255,255,255,0);
  pointer-events:none; z-index:2147483646; display:none;
}
html.wah-highlight-cursor .wah-cursor{ display:block; }

/* ===== Links hervorheben (with configurable color) ===== */
html.wah-highlight-links [data-wah-reader-target] a{
  outline: 3px solid var(--wah-highlight-color) !important;
  outline-offset: 2px !important;
  text-decoration: underline !important;
}

/* ===== Contrast Presets (scoped to content) ===== */
/* Blau-Orange */
html.wah-contrast-bo [data-wah-contrast-target],
html.wah-contrast-bo [data-wah-contrast-target] *{
  background-color:#0a3161 !important; color:#ffa500 !important; border-color:#ffa500 !important;
}
/* Explicit headings & links (higher specificity) */
html.wah-contrast-bo [data-wah-contrast-target][data-wah-contrast-target] h1,
html.wah-contrast-bo [data-wah-contrast-target][data-wah-contrast-target] h2,
html.wah-contrast-bo [data-wah-contrast-target][data-wah-contrast-target] h3,
html.wah-contrast-bo [data-wah-contrast-target][data-wah-contrast-target] h4,
html.wah-contrast-bo [data-wah-contrast-target][data-wah-contrast-target] h5,
html.wah-contrast-bo [data-wah-contrast-target][data-wah-contrast-target] h6,
html.wah-contrast-bo [data-wah-contrast-target][data-wah-contrast-target] h1 a,
html.wah-contrast-bo [data-wah-contrast-target][data-wah-contrast-target] h2 a,
html.wah-contrast-bo [data-wah-contrast-target][data-wah-contrast-target] h3 a,
html.wah-contrast-bo [data-wah-contrast-target][data-wah-contrast-target] h4 a,
html.wah-contrast-bo [data-wah-contrast-target][data-wah-contrast-target] h5 a,
html.wah-contrast-bo [data-wah-contrast-target][data-wah-contrast-target] h6 a{
  color:#ffa500 !important; background-color:transparent !important; border-color:#ffa500 !important;
}

/* Schwarz-Weiß */
html.wah-contrast-bw [data-wah-contrast-target],
html.wah-contrast-bw [data-wah-contrast-target] *{
  background-color:#000000 !important; color:#ffffff !important; border-color:#ffffff !important;
}
html.wah-contrast-bw [data-wah-contrast-target][data-wah-contrast-target] h1,
html.wah-contrast-bw [data-wah-contrast-target][data-wah-contrast-target] h2,
html.wah-contrast-bw [data-wah-contrast-target][data-wah-contrast-target] h3,
html.wah-contrast-bw [data-wah-contrast-target][data-wah-contrast-target] h4,
html.wah-contrast-bw [data-wah-contrast-target][data-wah-contrast-target] h5,
html.wah-contrast-bw [data-wah-contrast-target][data-wah-contrast-target] h6,
html.wah-contrast-bw [data-wah-contrast-target][data-wah-contrast-target] h1 a,
html.wah-contrast-bw [data-wah-contrast-target][data-wah-contrast-target] h2 a,
html.wah-contrast-bw [data-wah-contrast-target][data-wah-contrast-target] h3 a,
html.wah-contrast-bw [data-wah-contrast-target][data-wah-contrast-target] h4 a,
html.wah-contrast-bw [data-wah-contrast-target][data-wah-contrast-target] h5 a,
html.wah-contrast-bw [data-wah-contrast-target][data-wah-contrast-target] h6 a{
  color:#ffffff !important; background-color:transparent !important; border-color:#ffffff !important;
}

/* Weiß-Schwarz */
html.wah-contrast-wb [data-wah-contrast-target],
html.wah-contrast-wb [data-wah-contrast-target] *{
  background-color:#ffffff !important; color:#000000 !important; border-color:#000000 !important;
}
html.wah-contrast-wb [data-wah-contrast-target][data-wah-contrast-target] h1,
html.wah-contrast-wb [data-wah-contrast-target][data-wah-contrast-target] h2,
html.wah-contrast-wb [data-wah-contrast-target][data-wah-contrast-target] h3,
html.wah-contrast-wb [data-wah-contrast-target][data-wah-contrast-target] h4,
html.wah-contrast-wb [data-wah-contrast-target][data-wah-contrast-target] h5,
html.wah-contrast-wb [data-wah-contrast-target][data-wah-contrast-target] h6,
html.wah-contrast-wb [data-wah-contrast-target][data-wah-contrast-target] h1 a,
html.wah-contrast-wb [data-wah-contrast-target][data-wah-contrast-target] h2 a,
html.wah-contrast-wb [data-wah-contrast-target][data-wah-contrast-target] h3 a,
html.wah-contrast-wb [data-wah-contrast-target][data-wah-contrast-target] h4 a,
html.wah-contrast-wb [data-wah-contrast-target][data-wah-contrast-target] h5 a,
html.wah-contrast-wb [data-wah-contrast-target][data-wah-contrast-target] h6 a{
  color:#000000 !important; background-color:transparent !important; border-color:#000000 !important;
}

/* Divi 5 Toggle: title colors can be emitted with highly specific dynamic CSS.
   Keep toggle titles aligned with the selected MSX contrast preset in open and closed states. */
html.wah-contrast-bo [data-wah-contrast-target][data-wah-contrast-target] .et_pb_toggle.et_pb_toggle .et_pb_toggle_title.et_pb_toggle_title{
  color:#ffa500 !important; -webkit-text-fill-color:#ffa500 !important; border-color:#ffa500 !important;
}
html.wah-contrast-bw [data-wah-contrast-target][data-wah-contrast-target] .et_pb_toggle.et_pb_toggle .et_pb_toggle_title.et_pb_toggle_title{
  color:#ffffff !important; -webkit-text-fill-color:#ffffff !important; border-color:#ffffff !important;
}
html.wah-contrast-wb [data-wah-contrast-target][data-wah-contrast-target] .et_pb_toggle.et_pb_toggle .et_pb_toggle_title.et_pb_toggle_title{
  color:#000000 !important; -webkit-text-fill-color:#000000 !important; border-color:#000000 !important;
}

/* Divi 5 contrast continuity: use the active contrast background on the complete
   section surface, not only on rows/modules. This prevents visible dark gaps
   around content boxes and suppresses theme background images/gradients that
   could break the selected contrast palette. */
html.wah-contrast-bo [data-wah-contrast-target][data-wah-contrast-target] .et_pb_section.et_pb_section,
html.wah-contrast-bo [data-wah-contrast-target][data-wah-contrast-target] section.et_pb_section{
  background:#0a3161 !important;
  background-image:none !important;
}
html.wah-contrast-bw [data-wah-contrast-target][data-wah-contrast-target] .et_pb_section.et_pb_section,
html.wah-contrast-bw [data-wah-contrast-target][data-wah-contrast-target] section.et_pb_section{
  background:#000000 !important;
  background-image:none !important;
}
html.wah-contrast-wb [data-wah-contrast-target][data-wah-contrast-target] .et_pb_section.et_pb_section,
html.wah-contrast-wb [data-wah-contrast-target][data-wah-contrast-target] section.et_pb_section{
  background:#ffffff !important;
  background-image:none !important;
}

/* Divi background helper layers must not reintroduce an image/gradient over the
   forced section color while a contrast preset is active. Normal inline images
   remain untouched. */
html:is(.wah-contrast-bo,.wah-contrast-bw,.wah-contrast-wb) [data-wah-contrast-target][data-wah-contrast-target] .et_pb_section :is(.et_pb_background_mask,.et_pb_background_pattern,.et_parallax_bg){
  background-image:none !important;
}

/* Descender fix for tight Divi headings. The previous universal contrast
   background could also paint a solid background on inline <strong>/<span>
   fragments. With tight line-height those later inline boxes can visually cover
   the lower part of glyphs such as g, j, p, q and y. Keep heading internals
   transparent and allow glyph overflow while preserving the contrast text color. */
html:is(.wah-contrast-bo,.wah-contrast-bw,.wah-contrast-wb) [data-wah-contrast-target][data-wah-contrast-target] :is(.et_pb_text,.et_pb_text_inner,.et_pb_heading,.et_pb_heading_container,h1,h2,h3,h4,h5,h6){
  overflow:visible !important;
}
html:is(.wah-contrast-bo,.wah-contrast-bw,.wah-contrast-wb) [data-wah-contrast-target][data-wah-contrast-target] :is(h1,h2,h3,h4,h5,h6) :is(span,strong,em,b,i,small,sub,sup){
  background-color:transparent !important;
  background-image:none !important;
}

/* Strong interactive-element contrast override (Divi/third-party button safe) */
html.wah-contrast-bo [data-wah-contrast-target] :is(a,button,.button,.et_pb_button,.wp-element-button,.wp-block-button__link,input[type="button"],input[type="submit"],input[type="reset"],[role="button"]),
html.wah-contrast-bo [data-wah-contrast-target] :is(a,button,.button,.et_pb_button,.wp-element-button,.wp-block-button__link,[role="button"])::before,
html.wah-contrast-bo [data-wah-contrast-target] :is(a,button,.button,.et_pb_button,.wp-element-button,.wp-block-button__link,[role="button"])::after{
  color:#ffa500 !important; -webkit-text-fill-color:#ffa500 !important; border-color:#ffa500 !important;
}
html.wah-contrast-bw [data-wah-contrast-target] :is(a,button,.button,.et_pb_button,.wp-element-button,.wp-block-button__link,input[type="button"],input[type="submit"],input[type="reset"],[role="button"]),
html.wah-contrast-bw [data-wah-contrast-target] :is(a,button,.button,.et_pb_button,.wp-element-button,.wp-block-button__link,[role="button"])::before,
html.wah-contrast-bw [data-wah-contrast-target] :is(a,button,.button,.et_pb_button,.wp-element-button,.wp-block-button__link,[role="button"])::after{
  color:#ffffff !important; -webkit-text-fill-color:#ffffff !important; border-color:#ffffff !important;
}
html.wah-contrast-wb [data-wah-contrast-target] :is(a,button,.button,.et_pb_button,.wp-element-button,.wp-block-button__link,input[type="button"],input[type="submit"],input[type="reset"],[role="button"]),
html.wah-contrast-wb [data-wah-contrast-target] :is(a,button,.button,.et_pb_button,.wp-element-button,.wp-block-button__link,[role="button"])::before,
html.wah-contrast-wb [data-wah-contrast-target] :is(a,button,.button,.et_pb_button,.wp-element-button,.wp-block-button__link,[role="button"])::after{
  color:#000000 !important; -webkit-text-fill-color:#000000 !important; border-color:#000000 !important;
}


/* Form controls must remain clearly distinguishable in contrast modes. */
html.wah-contrast-bo [data-wah-contrast-target][data-wah-contrast-target] :is(
  input[type="text"],input[type="email"],input[type="tel"],input[type="url"],input[type="search"],input[type="number"],input[type="password"],input[type="date"],input[type="time"],input[type="datetime-local"],input[type="month"],input[type="week"],textarea,select,.wpcf7-text,.wpcf7-textarea,.wpcf7-select
){
  background-color:#ffa500 !important;
  color:#0a3161 !important;
  -webkit-text-fill-color:#0a3161 !important;
  border:2px solid #ffa500 !important;
  outline-color:#ffa500;
  caret-color:#0a3161 !important;
  box-shadow:none !important;
  opacity:1 !important;
}
html.wah-contrast-bw [data-wah-contrast-target][data-wah-contrast-target] :is(
  input[type="text"],input[type="email"],input[type="tel"],input[type="url"],input[type="search"],input[type="number"],input[type="password"],input[type="date"],input[type="time"],input[type="datetime-local"],input[type="month"],input[type="week"],textarea,select,.wpcf7-text,.wpcf7-textarea,.wpcf7-select
){
  background-color:#ffffff !important;
  color:#000000 !important;
  -webkit-text-fill-color:#000000 !important;
  border:2px solid #ffffff !important;
  outline-color:#ffffff;
  caret-color:#000000 !important;
  box-shadow:none !important;
  opacity:1 !important;
}
html.wah-contrast-wb [data-wah-contrast-target][data-wah-contrast-target] :is(
  input[type="text"],input[type="email"],input[type="tel"],input[type="url"],input[type="search"],input[type="number"],input[type="password"],input[type="date"],input[type="time"],input[type="datetime-local"],input[type="month"],input[type="week"],textarea,select,.wpcf7-text,.wpcf7-textarea,.wpcf7-select
){
  background-color:#000000 !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
  border:2px solid #000000 !important;
  outline-color:#000000;
  caret-color:#ffffff !important;
  box-shadow:none !important;
  opacity:1 !important;
}

html.wah-contrast-bo [data-wah-contrast-target] :is(input,textarea)::placeholder{
  color:#0a3161 !important; -webkit-text-fill-color:#0a3161 !important; opacity:1 !important;
}
html.wah-contrast-bw [data-wah-contrast-target] :is(input,textarea)::placeholder{
  color:#000000 !important; -webkit-text-fill-color:#000000 !important; opacity:1 !important;
}
html.wah-contrast-wb [data-wah-contrast-target] :is(input,textarea)::placeholder{
  color:#ffffff !important; -webkit-text-fill-color:#ffffff !important; opacity:1 !important;
}

html.wah-contrast-bo [data-wah-contrast-target] select option{ background:#ffa500 !important; color:#0a3161 !important; }
html.wah-contrast-bw [data-wah-contrast-target] select option{ background:#ffffff !important; color:#000000 !important; }
html.wah-contrast-wb [data-wah-contrast-target] select option{ background:#000000 !important; color:#ffffff !important; }

/* CF7 character counter and comparable helper text must not fade in contrast modes. */
html.wah-contrast-bo [data-wah-contrast-target] :is(.wpcf7-character-count,[class*="character-count"]),
html.wah-contrast-bo [data-wah-contrast-target] :is(.wpcf7-character-count,[class*="character-count"]) *{
  color:#ffa500 !important; -webkit-text-fill-color:#ffa500 !important; background:transparent !important; opacity:1 !important;
}
html.wah-contrast-bw [data-wah-contrast-target] :is(.wpcf7-character-count,[class*="character-count"]),
html.wah-contrast-bw [data-wah-contrast-target] :is(.wpcf7-character-count,[class*="character-count"]) *{
  color:#ffffff !important; -webkit-text-fill-color:#ffffff !important; background:transparent !important; opacity:1 !important;
}
html.wah-contrast-wb [data-wah-contrast-target] :is(.wpcf7-character-count,[class*="character-count"]),
html.wah-contrast-wb [data-wah-contrast-target] :is(.wpcf7-character-count,[class*="character-count"]) *{
  color:#000000 !important; -webkit-text-fill-color:#000000 !important; background:transparent !important; opacity:1 !important;
}

/* Stop animations/transitions when requested */
html.wah-stop-animations *, html.wah-stop-animations *::before, html.wah-stop-animations *::after {
  animation-duration: .001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: .001ms !important;
  scroll-behavior: auto !important;
}
html.wah-stop-animations video, html.wah-stop-animations img, html.wah-stop-animations svg {
  animation-duration: .001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: .001ms !important;
}

/* Reset-Buttons Abstand */
.wah-reset { font-size:1rem; margin-bottom:20px; margin-top:5px; background:var(--wah-reset-bg,var(--wah-primary-bg,#1985CF)); color:var(--wah-reset-text,var(--wah-primary-text,#fff)); border-color:var(--wah-reset-border,var(--wah-primary-border,#1985CF)); padding:5px 10px; border-style:solid; border-width:0; cursor:pointer; border-radius:4px;}
.wah-reset:hover {transform: scale(1.05);}
.wah-reset:last-child { margin-bottom: 10px; }

/* Toolbar-Titel Default */
#wah-toolbar .wah-toolbar-title,
#wah-toolbar .wah-toolbar-header h2 { font-size: 1.25rem !important; }

/* Theme colors are driven exclusively by backend-generated CSS variables. */
#wah-toolbar,
#wah-toolbar[data-theme="dark"],
#wah-toolbar[data-theme="light"]{
  background:var(--wah-toolbar-bg) !important;
  color:var(--wah-toolbar-text) !important;
  border-color:var(--wah-toolbar-border) !important;
}
#wah-toolbar .wah-toolbar-body{ color:var(--wah-toolbar-text) !important; }
#wah-toolbar .wah-toolbar-header h2,
#wah-toolbar .wah-toolbar-body h3{ color:var(--wah-heading-color,var(--wah-toolbar-text)) !important; }
#wah-toolbar .wah-toolbar-body section{
  background:var(--wah-section-bg) !important;
  border-color:var(--wah-section-border) !important;
  border-radius:var(--wah-section-radius,4px) !important;
  padding-left:20px !important;
}

/* --- MSX Barrierefreiheit: Responsive improvements --- */
.wah-fab{
  bottom: max(1rem, env(safe-area-inset-bottom) + .5rem);
  right:  max(1rem, env(safe-area-inset-right)  + .5rem);
}
#wah-toolbar{
  max-width: calc(100vw - 16px);
  width: min(560px, calc(100vw - 16px));
  margin: 0 auto;
  box-sizing: border-box;
  height: min(100dvh, 100vh);
  overflow: hidden;
}
#wah-toolbar,
#wah-toolbar *{
  box-sizing: border-box;
}
#wah-toolbar .wah-toolbar-body{
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
}
#wah-toolbar .wah-toolbar-header,
#wah-toolbar .wah-toolbar-footer,
#wah-toolbar .wah-toolbar-body section{
  max-width: 100%;
}
#wah-toolbar .wah-toolbar-footer{
  flex-wrap: wrap;
}
#wah-toolbar .wah-toolbar-footer{
  align-items: stretch;
  gap: 10px;
}
#wah-toolbar .wah-toolbar-footer .wah-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(16px, 0.18vw + 15.43px, 18px);
  min-height: 50px;
  margin: 0;
  text-align: center;
  white-space: normal;
}
#wah-toolbar .wah-toolbar-footer .wah-btn.danger{
  flex: 1 1 58%;
  width: auto;
}
#wah-toolbar .wah-toolbar-footer #wah-close{
  flex: 1 1 34%;
}
#wah-toolbar .wah-section{
  padding-inline: clamp(8px, 3vw, 16px);
}
.wah-fab--offset-banner{ bottom: 5.5rem; }

@media (max-width: 1023px){
  #wah-toolbar{ max-width: calc(100vw - 16px); }
}

@media (max-width: 834px){
  .wah-fab {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 2147483646;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 0 !important;
    background: transparent !important;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: none !important;
    transition: transform .06s ease;
  }
  #wah-toolbar{ max-width: calc(100vw - 16px); }
}

@media (max-width: 460px){
  #wah-toolbar .wah-toolbar-footer{
    flex-direction: column;
  }
  #wah-toolbar .wah-toolbar-footer .wah-btn,
  #wah-toolbar .wah-toolbar-footer .wah-btn.danger,
  #wah-toolbar .wah-toolbar-footer #wah-close{
    flex: 1 1 auto;
    width: 100%;
  }
}
.wah-toolbar-body label{ font-size:1.15rem !important; }

@media (max-width: 1279px){
#wah-mauszeiger-hervorheben {display: none;}
}
