/*!
 * DESIGN 71 Barrierefreiheit – Frontend-Styles
 * Farben/Position kommen als CSS-Variablen aus den Plugin-Einstellungen (:root --d71a-…).
 * Wirkung über Klassen am <html>: d71a-lh-1 … d71a-noanim. Das Menü selbst (.d71a-ui) und die
 * WordPress-Adminleiste bleiben immer unverändert.
 */
@font-face {
  font-family: "OpenDyslexic";
  src: url("fonts/opendyslexic-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "OpenDyslexic";
  src: url("fonts/opendyslexic-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --d71a-primary: #2072b9;
  --d71a-primary-hover: #185d99;
  --d71a-head: #0b2a47;
  --d71a-accent: #f6b100;
  --d71a-icon: #ffffff;
  --d71a-size: 58px;
  --d71a-side: 20px;
  --d71a-bottom: 20px;
  --d71a-bottom-m: 20px;
  --d71a-z: 99990;
  --d71a-ink: #0f2236;
  --d71a-muted: #566577;
  --d71a-line: #dde3ea;
  --d71a-tint: #f3f6f9;
}

/* ===================== Wirkung auf der Website ===================== */

/* Zeilenhöhe */
html.d71a-lh-1 body *:not(.d71a-ui, .d71a-ui *, #wpadminbar, #wpadminbar *) { line-height: 1.75 !important; }
html.d71a-lh-2 body *:not(.d71a-ui, .d71a-ui *, #wpadminbar, #wpadminbar *) { line-height: 2.05 !important; }
html.d71a-lh-3 body *:not(.d71a-ui, .d71a-ui *, #wpadminbar, #wpadminbar *) { line-height: 2.4 !important; }

/* Buchstaben- und Wortabstand (Arabisch/Persisch: nur Wortabstand, sonst reißen die Buchstaben-Verbindungen) */
html.d71a-ls-1 body *:not(.d71a-ui, .d71a-ui *, #wpadminbar, #wpadminbar *) { letter-spacing: 0.06em !important; word-spacing: 0.12em !important; }
html.d71a-ls-2 body *:not(.d71a-ui, .d71a-ui *, #wpadminbar, #wpadminbar *) { letter-spacing: 0.12em !important; word-spacing: 0.24em !important; }
html.d71a-ls-3 body *:not(.d71a-ui, .d71a-ui *, #wpadminbar, #wpadminbar *) { letter-spacing: 0.18em !important; word-spacing: 0.36em !important; }
html[dir="rtl"].d71a-ls-1 body *:not(.d71a-ui, .d71a-ui *, #wpadminbar, #wpadminbar *) { letter-spacing: 0 !important; word-spacing: 0.2em !important; }
html[dir="rtl"].d71a-ls-2 body *:not(.d71a-ui, .d71a-ui *, #wpadminbar, #wpadminbar *) { letter-spacing: 0 !important; word-spacing: 0.4em !important; }
html[dir="rtl"].d71a-ls-3 body *:not(.d71a-ui, .d71a-ui *, #wpadminbar, #wpadminbar *) { letter-spacing: 0 !important; word-spacing: 0.6em !important; }

/* Textausrichtung */
html.d71a-ta-left body :is(p, li, h1, h2, h3, h4, h5, h6, blockquote, dt, dd, figcaption, label):not(.d71a-ui *) { text-align: left !important; }
html.d71a-ta-center body :is(p, li, h1, h2, h3, h4, h5, h6, blockquote, dt, dd, figcaption, label):not(.d71a-ui *) { text-align: center !important; }
html.d71a-ta-right body :is(p, li, h1, h2, h3, h4, h5, h6, blockquote, dt, dd, figcaption, label):not(.d71a-ui *) { text-align: right !important; }

/* Schrift */
html.d71a-bold body *:not(.d71a-ui, .d71a-ui *, #wpadminbar, #wpadminbar *) { font-weight: 700 !important; }
html.d71a-readable body *:not(.d71a-ui, .d71a-ui *, #wpadminbar, #wpadminbar *, [class*="icon"], [class*="Icon"], [class^="et-pb-icon"], [data-icon], i) {
  font-family: Verdana, Tahoma, "Segoe UI", Arial, sans-serif !important;
}
html.d71a-dyslexic body *:not(.d71a-ui, .d71a-ui *, #wpadminbar, #wpadminbar *, [class*="icon"], [class*="Icon"], [class^="et-pb-icon"], [data-icon], i) {
  font-family: "OpenDyslexic", Verdana, Arial, sans-serif !important;
}

/* Großer Mauszeiger */
html.d71a-cursor,
html.d71a-cursor * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24'%3E%3Cpath d='M4 2l15 11.5-6.6 1 3.9 7.3-2.9 1.5-3.9-7.4L4 20z' fill='%23000' stroke='%23fff' stroke-width='1.3' stroke-linejoin='round'/%3E%3C/svg%3E") 8 4, auto !important;
}

/* Hervorheben */
html.d71a-links body a:not(.d71a-ui *, #wpadminbar *) {
  text-decoration: underline !important;
  text-decoration-thickness: 2px !important;
  text-underline-offset: 3px !important;
  outline: 3px solid var(--d71a-accent) !important;
  outline-offset: 2px !important;
}
html.d71a-titles body :is(h1, h2, h3, h4, h5, h6):not(.d71a-ui *) {
  outline: 3px solid var(--d71a-primary) !important;
  outline-offset: 5px !important;
}
html.d71a-content body :is(p, li, h1, h2, h3, h4, h5, h6, img, figure, blockquote, a, button, dd, dt):not(.d71a-ui *, #wpadminbar *):hover {
  outline: 3px dashed var(--d71a-primary) !important;
  outline-offset: 4px !important;
}

/* Farben: Filter auf dem Wurzelelement (stört keine fixierten Elemente) */
html.d71a-c-high { filter: contrast(1.45); }
html.d71a-c-mono { filter: grayscale(1); }
html.d71a-c-lowsat { filter: saturate(0.45); }
html.d71a-c-highsat { filter: saturate(2); }

html.d71a-c-dark,
html.d71a-c-dark body { background: #000 !important; }
html.d71a-c-dark body *:not(.d71a-ui, .d71a-ui *, #wpadminbar, #wpadminbar *, img, svg, svg *, video, picture, iframe, canvas) {
  background-color: #000 !important;
  color: #fff !important;
  border-color: #666 !important;
  box-shadow: none !important;
  text-shadow: none !important;
}
html.d71a-c-dark body a:not(.d71a-ui *, #wpadminbar *),
html.d71a-c-dark body a *:not(.d71a-ui *, img, svg, svg *) { color: #ffe14d !important; }

html.d71a-c-light,
html.d71a-c-light body { background: #fff !important; }
html.d71a-c-light body *:not(.d71a-ui, .d71a-ui *, #wpadminbar, #wpadminbar *, img, svg, svg *, video, picture, iframe, canvas) {
  background-color: #fff !important;
  color: #000 !important;
  border-color: #000 !important;
  box-shadow: none !important;
  text-shadow: none !important;
}
html.d71a-c-light body a:not(.d71a-ui *, #wpadminbar *),
html.d71a-c-light body a *:not(.d71a-ui *, img, svg, svg *) { color: #0033cc !important; }

/* Bilder ausblenden (Logos in Kopfbereichen bleiben sichtbar) */
html.d71a-noimg body :is(img, picture, video, iframe):not(.d71a-ui *, #wpadminbar *, header img, [class*="logo"] img, img[class*="logo"], img[id*="logo"]) { visibility: hidden !important; }
html.d71a-noimg body *:not(.d71a-ui, .d71a-ui *, #wpadminbar, #wpadminbar *, header, header *) { background-image: none !important; }

/* Animationen stoppen */
html.d71a-noanim,
html.d71a-noanim *,
html.d71a-noanim *::before,
html.d71a-noanim *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}
/* Divi-/Theme-Einblendanimationen: Elemente sofort sichtbar */
html.d71a-noanim .et_animated,
html.d71a-noanim .et-waypoint,
html.d71a-noanim [data-aos],
html.d71a-noanim .wow {
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
}

/* Tastatur-Navigation: sehr deutliche Fokus-Markierung */
html.d71a-keyboard *:focus {
  outline: 4px solid var(--d71a-accent) !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 8px var(--d71a-head) !important;
}

/* Vorlesen */
html.d71a-tts body :is(p, li, h1, h2, h3, h4, h5, h6, td, th, dt, dd, blockquote, figcaption):not(.d71a-ui *):hover {
  cursor: help;
  background-color: rgba(127, 127, 127, 0.14);
}
.d71a-speaking {
  outline: 3px solid var(--d71a-accent) !important;
  outline-offset: 3px !important;
  background-color: #fff7d6 !important;
  color: #0f2236 !important;
}

/* ===================== Das Menü selbst ===================== */
/* feste px-Werte und eigene Grundwerte, damit Theme-Styles (Divi, Elementor …) es nicht verändern */
.d71a-ui,
.d71a-ui * {
  box-sizing: border-box;
}
.d71a-ui {
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: normal;
  word-spacing: normal;
  text-transform: none;
  color: var(--d71a-ink);
}
.d71a-ui [hidden] {
  display: none !important;
}
.d71a-ui button {
  margin: 0;
  font-family: inherit;
  text-transform: none;
  letter-spacing: normal;
  -webkit-appearance: none;
  appearance: none;
}
.d71a-ui svg {
  display: block;
  flex-shrink: 0;
  fill: none !important;
  stroke: currentColor;
}
.d71a-ui .d71a-launcher {
  position: fixed;
  z-index: var(--d71a-z);
  bottom: var(--d71a-bottom);
  display: flex;
  width: var(--d71a-size);
  height: var(--d71a-size);
  min-height: 0;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 3px solid #fff;
  border-radius: 9999px;
  background: var(--d71a-primary);
  color: var(--d71a-icon);
  cursor: pointer;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.55);
  transition: transform 0.2s, background-color 0.2s;
}
.d71a-ui .d71a-launcher svg {
  width: 55%;
  height: 55%;
}
.d71a-pos-left .d71a-launcher { left: var(--d71a-side); }
.d71a-pos-right .d71a-launcher { right: var(--d71a-side); }
.d71a-ui .d71a-launcher:hover {
  transform: scale(1.06);
  background: var(--d71a-primary-hover);
}
.d71a-ui .d71a-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid #fff;
  border-radius: 9999px;
  background: var(--d71a-accent);
}
.d71a-ui .d71a-launcher.d71a-active .d71a-badge {
  display: block;
}
.d71a-ui .d71a-panel {
  position: fixed;
  z-index: calc(var(--d71a-z) + 2);
  bottom: calc(var(--d71a-bottom) + var(--d71a-size) + 14px);
  display: flex;
  width: 410px;
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - var(--d71a-bottom) - var(--d71a-size) - 40px);
  max-height: calc(100dvh - var(--d71a-bottom) - var(--d71a-size) - 40px);
  flex-direction: column;
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(0, 0, 0, 0.06);
  text-align: start;
}
.d71a-ui .d71a-panel[hidden] {
  display: none !important;
}
.d71a-pos-left .d71a-panel { left: var(--d71a-side); }
.d71a-pos-right .d71a-panel { right: var(--d71a-side); }

@media (max-width: 767px) {
  .d71a-ui .d71a-launcher {
    bottom: var(--d71a-bottom-m);
    width: calc(var(--d71a-size) - 6px);
    height: calc(var(--d71a-size) - 6px);
  }
  .d71a-pos-left .d71a-launcher { left: 12px; }
  .d71a-pos-right .d71a-launcher { right: 12px; }
  .d71a-ui .d71a-panel {
    left: 8px !important;
    right: 8px !important;
    width: auto;
    max-width: none;
    bottom: calc(var(--d71a-bottom-m) + var(--d71a-size) + 6px);
    max-height: calc(100dvh - var(--d71a-bottom-m) - var(--d71a-size) - 24px);
  }
  .d71a-ui .d71a-kbd {
    display: none;
  }
  .d71a-hide-mobile {
    display: none !important;
  }
}

.d71a-ui .d71a-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0;
  padding: 18px 18px 18px 20px;
  background: var(--d71a-head);
  color: #fff;
}
.d71a-ui .d71a-head-icon {
  display: flex;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--d71a-primary);
  color: var(--d71a-icon);
}
.d71a-ui .d71a-head-text {
  min-width: 0;
  flex: 1;
}
.d71a-ui .d71a-h2 {
  margin: 0;
  padding: 0;
  border: 0;
  color: #fff;
  font-family: inherit;
  font-size: 19px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-transform: none;
}
.d71a-ui .d71a-sub {
  margin: 3px 0 0;
  padding: 0;
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
  line-height: 1.35;
}
.d71a-ui .d71a-close {
  display: flex;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
}
.d71a-ui .d71a-close:hover {
  background: rgba(255, 255, 255, 0.25);
}
.d71a-ui .d71a-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 4px 16px 18px;
  background: var(--d71a-tint);
}
.d71a-ui .d71a-h3 {
  margin: 18px 4px 10px;
  padding: 0;
  color: var(--d71a-muted);
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
[dir="rtl"] .d71a-ui .d71a-h3 {
  letter-spacing: 0;
}
.d71a-ui .d71a-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.d71a-ui .d71a-tile {
  display: flex;
  min-height: 96px;
  width: auto;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 13px 6px 10px;
  border: 1.5px solid var(--d71a-line);
  border-radius: 16px;
  background: #fff;
  color: var(--d71a-ink);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  hyphens: manual;
  overflow-wrap: break-word;
  cursor: pointer;
  box-shadow: none;
  transition: border-color 0.15s, background-color 0.15s, color 0.15s;
}
.d71a-ui .d71a-tile:hover {
  border-color: var(--d71a-primary);
}
.d71a-ui .d71a-tile svg {
  width: 24px;
  height: 24px;
  color: var(--d71a-primary);
}
.d71a-ui .d71a-tile[aria-pressed="true"] {
  border-color: var(--d71a-primary);
  background: var(--d71a-primary);
  color: var(--d71a-icon);
}
.d71a-ui .d71a-tile[aria-pressed="true"] svg {
  color: var(--d71a-icon);
}
.d71a-ui .d71a-val {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.85;
}
.d71a-ui .d71a-dots {
  display: flex;
  gap: 4px;
  margin-top: auto;
}
.d71a-ui .d71a-dots span {
  display: block;
  width: 14px;
  height: 4px;
  border-radius: 2px;
  background: var(--d71a-line);
}
.d71a-ui .d71a-dots span.on {
  background: var(--d71a-primary);
}
.d71a-ui .d71a-tile[aria-pressed="true"] .d71a-dots span {
  background: rgba(255, 255, 255, 0.35);
}
.d71a-ui .d71a-tile[aria-pressed="true"] .d71a-dots span.on {
  background: var(--d71a-icon);
}
.d71a-ui .d71a-skip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.d71a-ui .d71a-chip {
  padding: 9px 16px;
  border: 1.5px solid var(--d71a-line);
  border-radius: 9999px;
  background: #fff;
  color: var(--d71a-ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
}
.d71a-ui .d71a-chip:hover {
  border-color: var(--d71a-primary);
}
.d71a-ui .d71a-notice {
  margin: 14px 2px 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff7d6;
  color: #5c4500;
  font-size: 12.5px;
  line-height: 1.4;
}
.d71a-ui .d71a-foot {
  display: grid;
  gap: 10px;
  padding: 12px 16px 14px;
  border-top: 1px solid var(--d71a-line);
  background: #fff;
}
.d71a-ui .d71a-reset {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border: 0;
  border-radius: 9999px;
  background: var(--d71a-head);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.d71a-ui .d71a-reset:hover {
  background: var(--d71a-primary);
  color: var(--d71a-icon);
}
.d71a-ui .d71a-foot-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
  color: var(--d71a-muted);
  font-size: 12px;
}
.d71a-ui .d71a-link {
  color: var(--d71a-head);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.d71a-ui kbd {
  padding: 1px 5px;
  border: 1px solid var(--d71a-line);
  border-radius: 5px;
  background: var(--d71a-tint);
  color: var(--d71a-ink);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
}
.d71a-ui .d71a-hide-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--d71a-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.d71a-ui .d71a-hide-btn:hover {
  color: var(--d71a-ink);
}
.d71a-ui .d71a-hide-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.d71a-ui .d71a-hide-opts button {
  padding: 7px 12px;
  border: 1.5px solid var(--d71a-line);
  border-radius: 9999px;
  background: #fff;
  color: var(--d71a-ink);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.d71a-ui .d71a-hide-opts button:hover {
  border-color: var(--d71a-primary);
}
.d71a-ui :focus-visible {
  outline: 3px solid var(--d71a-accent) !important;
  outline-offset: 2px !important;
}

/* Leselinie, Lesemaske, Textlupe */
.d71a-ui .d71a-line {
  position: fixed;
  z-index: calc(var(--d71a-z) + 1);
  top: -5px;
  left: 0;
  right: 0;
  height: 10px;
  border-top: 2px solid var(--d71a-head);
  border-bottom: 2px solid var(--d71a-head);
  background: var(--d71a-accent);
  opacity: 0.9;
  pointer-events: none;
  will-change: transform;
}
.d71a-ui .d71a-mask {
  position: fixed;
  z-index: calc(var(--d71a-z) + 1);
  left: 0;
  right: 0;
  background: rgba(8, 18, 30, 0.68);
  pointer-events: none;
}
.d71a-ui .d71a-mask-top {
  top: 0;
  height: 40vh;
}
.d71a-ui .d71a-mask-bottom {
  top: 60vh;
  bottom: 0;
}
.d71a-ui .d71a-mag {
  position: fixed;
  z-index: calc(var(--d71a-z) + 3);
  top: 0;
  left: 0;
  display: none;
  max-width: min(560px, 90vw);
  padding: 14px 18px;
  border-radius: 14px;
  background: var(--d71a-head);
  box-shadow: 0 20px 50px -15px rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 26px;
  font-weight: 600;
  line-height: 1.35;
  pointer-events: none;
}

/* Erklärung zur Barrierefreiheit (Shortcode) */
.d71a-statement .d71a-open-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 24px;
  padding: 12px 22px;
  border: 0;
  border-radius: 9999px;
  background: var(--d71a-primary);
  color: var(--d71a-icon);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.d71a-statement .d71a-open-btn:hover {
  background: var(--d71a-primary-hover);
}
.d71a-statement .d71a-open-btn svg {
  width: 20px;
  height: 20px;
}
@media print {
  .d71a-ui {
    display: none !important;
  }
}
