/* =========================================================
   MaxxWell® Barrierefreiheits-Werkzeug (100% lokal, DSGVO-konform)
   Inkl. Skip-Link, Vorlese-Reader & Screenreader-Optimierungen
   ========================================================= */

/* Skip-Link für Tastatur & Screenreader */
.a11y-skip-link {
  position: fixed;
  top: -120px;
  left: 16px;
  z-index: 10060;
  background: #1b1b1b;
  color: #ffffff !important;
  padding: 12px 18px;
  border-radius: 8px;
  border: 2px solid #fe7a01;
  font-family: Comfortaa, system-ui, Arial, sans-serif;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transition: top 0.15s ease;
}

.a11y-skip-link:focus {
  top: 16px;
  outline: 3px solid #fe7a01;
  outline-offset: 3px;
}

#a11y-widget {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 10050;
  font-family: Comfortaa, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  color: #1b1b1b;
  letter-spacing: normal;
  word-spacing: normal;
}

#a11y-widget *,
#a11y-widget *::before,
#a11y-widget *::after {
  box-sizing: border-box;
}

/* Floating Trigger Button */
#a11y-toggle {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  background: #fe7a01;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
  transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease;
  padding: 0;
}

#a11y-toggle:hover {
  filter: brightness(1.06);
  transform: scale(1.05);
}

#a11y-toggle:focus-visible {
  outline: 3px solid #1b1b1b;
  outline-offset: 3px;
}

#a11y-toggle .a11y-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: #1b1b1b;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
}

#a11y-toggle .a11y-badge.visible {
  display: inline-flex;
}

/* Einstellungs-Panel */
#a11y-panel {
  position: fixed;
  right: 20px;
  bottom: 84px;
  width: 360px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  background: #ffffff;
  color: #1b1b1b;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.18);
  padding: 18px;
  display: none;
  z-index: 10051;
}

#a11y-panel.open {
  display: block;
}

.a11y-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid #eee;
}

.a11y-title {
  margin: 0;
  font-family: Audiowide, system-ui, sans-serif;
  font-size: 16px;
  color: #1b1b1b;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.a11y-close {
  background: #f3f4f6;
  color: #1b1b1b;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.a11y-close:hover {
  background: #e5e7eb;
}

.a11y-close:focus-visible {
  outline: 3px solid #fe7a01;
  outline-offset: 2px;
}

/* Vorlese-Reader Box */
.a11y-reader-box {
  background: #fff8f2;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 12px;
}

.a11y-reader-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.a11y-reader-title {
  font-weight: 700;
  font-size: 14px;
  color: #1b1b1b;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.a11y-reader-status {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e5e7eb;
  color: #4b5563;
}

.a11y-reader-status.active {
  background: #fe7a01;
  color: #ffffff;
}

.a11y-reader-controls {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  margin-bottom: 8px;
}

.a11y-reader-btn {
  background: #ffffff;
  color: #1b1b1b;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 8px 6px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.a11y-reader-btn.primary {
  background: #fe7a01;
  color: #ffffff;
  border-color: #fe7a01;
}

.a11y-reader-btn:hover:not(:disabled) {
  filter: brightness(0.97);
  border-color: #fe7a01;
}

.a11y-reader-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.a11y-reader-btn:focus-visible {
  outline: 3px solid #fe7a01;
  outline-offset: 2px;
}

.a11y-reader-subrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
}

.a11y-click-read-btn {
  flex: 1;
  background: #ffffff;
  color: #1b1b1b;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 7px 10px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
}

.a11y-click-read-btn[aria-pressed="true"] {
  background: #fe7a01;
  color: #ffffff;
  border-color: #fe7a01;
}

.a11y-click-read-btn:focus-visible {
  outline: 3px solid #fe7a01;
  outline-offset: 2px;
}

.a11y-speed-btn {
  background: #ffffff;
  color: #1b1b1b;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 7px 10px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.a11y-speed-btn:hover {
  border-color: #fe7a01;
  color: #fe7a01;
}

.a11y-speed-btn:focus-visible {
  outline: 3px solid #fe7a01;
  outline-offset: 2px;
}

.a11y-reader-note {
  margin: 6px 0 0;
  font-size: 11.5px;
  color: #6b6b6b;
}

/* Hervorhebung des aktuell vorgelesenen Textabschnitts */
.a11y-reading-highlight {
  outline: 3px solid #fe7a01 !important;
  outline-offset: 4px !important;
  background-color: rgba(254, 122, 1, 0.12) !important;
  border-radius: 6px;
}

html.a11y-click-to-read body *:not(#a11y-widget):not(#a11y-widget *) {
  cursor: pointer;
}

html.a11y-click-to-read p:hover,
html.a11y-click-to-read h1:hover,
html.a11y-click-to-read h2:hover,
html.a11y-click-to-read h3:hover,
html.a11y-click-to-read li:hover,
html.a11y-click-to-read td:hover {
  outline: 2px dashed #fe7a01 !important;
  outline-offset: 2px;
}

/* Schriftgröße-Steuerung */
.a11y-font-row {
  background: #fafafa;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 12px;
}

.a11y-font-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 10px;
  color: #1b1b1b;
}

.a11y-font-controls {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: center;
}

.a11y-step-btn {
  background: #ffffff;
  color: #1b1b1b;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.a11y-step-btn:hover {
  border-color: #fe7a01;
  color: #fe7a01;
}

.a11y-step-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.a11y-step-btn:focus-visible {
  outline: 3px solid #fe7a01;
  outline-offset: 2px;
}

.a11y-font-value {
  font-weight: 700;
  font-size: 14px;
  min-width: 52px;
  text-align: center;
  color: #fe7a01;
}

/* Optionen-Grid */
.a11y-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.a11y-opt {
  background: #fafafa;
  color: #1b1b1b;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 11px 10px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.a11y-opt:hover {
  border-color: #fe7a01;
  background: #fff8f2;
}

.a11y-opt[aria-pressed="true"] {
  background: #fff3e8;
  border-color: #fe7a01;
  box-shadow: inset 0 0 0 1px #fe7a01;
  color: #1b1b1b;
}

.a11y-opt:focus-visible {
  outline: 3px solid #fe7a01;
  outline-offset: 2px;
}

.a11y-opt-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.a11y-opt-icon {
  width: 20px;
  height: 20px;
  color: #fe7a01;
  flex-shrink: 0;
}

.a11y-opt-state {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
  background: #e5e7eb;
  color: #4b5563;
}

.a11y-opt[aria-pressed="true"] .a11y-opt-state {
  background: #fe7a01;
  color: #ffffff;
}

/* Footer / Reset */
.a11y-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid #eee;
}

.a11y-reset {
  width: 100%;
  background: #1b1b1b;
  color: #ffffff;
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.a11y-reset:hover {
  filter: brightness(1.15);
}

.a11y-reset:focus-visible {
  outline: 3px solid #fe7a01;
  outline-offset: 2px;
}

.a11y-hint {
  margin: 0;
  font-size: 11.5px;
  color: #6b6b6b;
  text-align: center;
}

.a11y-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* =========================================================
   AKTIVE BARRIEREFREIHEITS-MODI AUF DER WEBSITE
   ========================================================= */

/* 1. Schriftgröße */
html.a11y-font-scaled body {
  font-size: calc(16px * var(--a11y-font-scale, 1)) !important;
}

html.a11y-font-scaled p,
html.a11y-font-scaled li,
html.a11y-font-scaled td,
html.a11y-font-scaled th,
html.a11y-font-scaled label,
html.a11y-font-scaled input,
html.a11y-font-scaled textarea,
html.a11y-font-scaled .sub,
html.a11y-font-scaled .muted,
html.a11y-font-scaled .lead {
  font-size: calc(1em * var(--a11y-font-boost, 1));
}

/* Widget selbst bleibt in konstanter, bedienbarer Größe */
html.a11y-font-scaled #a11y-widget,
html.a11y-font-scaled #a11y-widget * {
  font-size: revert;
}
html.a11y-font-scaled #a11y-widget {
  font-size: 15px !important;
}
html.a11y-font-scaled #a11y-widget .a11y-title { font-size: 16px !important; }
html.a11y-font-scaled #a11y-widget .a11y-font-label,
html.a11y-font-scaled #a11y-widget .a11y-font-value,
html.a11y-font-scaled #a11y-widget .a11y-reader-title { font-size: 14px !important; }
html.a11y-font-scaled #a11y-widget .a11y-step-btn { font-size: 15px !important; }
html.a11y-font-scaled #a11y-widget .a11y-opt,
html.a11y-font-scaled #a11y-widget .a11y-reset { font-size: 13px !important; }
html.a11y-font-scaled #a11y-widget .a11y-reader-btn { font-size: 12.5px !important; }
html.a11y-font-scaled #a11y-widget .a11y-click-read-btn,
html.a11y-font-scaled #a11y-widget .a11y-speed-btn { font-size: 12px !important; }
html.a11y-font-scaled #a11y-widget .a11y-opt-state,
html.a11y-font-scaled #a11y-widget .a11y-reader-status { font-size: 11px !important; }
html.a11y-font-scaled #a11y-widget .a11y-hint,
html.a11y-font-scaled #a11y-widget .a11y-reader-note { font-size: 11.5px !important; }
html.a11y-font-scaled #a11y-widget .a11y-close { font-size: 18px !important; }

/* 2. Hoher Kontrast (WCAG AAA) */
html.a11y-high-contrast,
html.a11y-high-contrast body {
  background: #000000 !important;
  color: #ffffff !important;
}

html.a11y-high-contrast header.nav,
html.a11y-high-contrast #mobileMenu,
html.a11y-high-contrast footer,
html.a11y-high-contrast .card,
html.a11y-high-contrast .hero-card,
html.a11y-high-contrast .praevention-card,
html.a11y-high-contrast .ticker-viewport,
html.a11y-high-contrast .gtc-tarif-viewport,
html.a11y-high-contrast .gtc-tarif-card,
html.a11y-high-contrast .kp-card,
html.a11y-high-contrast .hours-table,
html.a11y-high-contrast .abo-dropdown,
html.a11y-high-contrast .studio-card,
html.a11y-high-contrast .acc-panel,
html.a11y-high-contrast .team-card,
html.a11y-high-contrast .wellness-card,
html.a11y-high-contrast .price-list,
html.a11y-high-contrast .fpz-hero,
html.a11y-high-contrast .therapy,
html.a11y-high-contrast .contact-box,
html.a11y-high-contrast .consent-box,
html.a11y-high-contrast .location-card,
html.a11y-high-contrast .captcha-box,
html.a11y-high-contrast .carousel {
  background: #111111 !important;
  color: #ffffff !important;
  border-color: #ffd60a !important;
  box-shadow: none !important;
}

html.a11y-high-contrast h1,
html.a11y-high-contrast h2,
html.a11y-high-contrast h3,
html.a11y-high-contrast h4,
html.a11y-high-contrast p,
html.a11y-high-contrast li,
html.a11y-high-contrast td,
html.a11y-high-contrast th,
html.a11y-high-contrast label,
html.a11y-high-contrast summary,
html.a11y-high-contrast strong,
html.a11y-high-contrast .sub,
html.a11y-high-contrast .muted,
html.a11y-high-contrast .gtc-tarif-subtitle,
html.a11y-high-contrast .gtc-tarif-features,
html.a11y-high-contrast .gtc-tarif-currency,
html.a11y-high-contrast .gtc-tarif-period,
html.a11y-high-contrast .kp-header,
html.a11y-high-contrast .kp-time,
html.a11y-high-contrast .hours-title,
html.a11y-high-contrast .price-right,
html.a11y-high-contrast .privacy-notice {
  color: #ffffff !important;
}

html.a11y-high-contrast a:not(.btn):not(.nav-cta):not(.praevention-btn):not(.consent-btn-secondary):not(.gtc-tarif-btn) {
  color: #ffd60a !important;
  text-decoration: underline !important;
}

html.a11y-high-contrast .btn,
html.a11y-high-contrast .nav-cta,
html.a11y-high-contrast .praevention-btn,
html.a11y-high-contrast .gtc-tarif-btn,
html.a11y-high-contrast .consent-btn,
html.a11y-high-contrast .filter-buttons .btn.active,
html.a11y-high-contrast .kp-location-buttons button.kp-active,
html.a11y-high-contrast #hero-btn1 {
  background: #ffd60a !important;
  color: #000000 !important;
  border: 2px solid #ffffff !important;
  box-shadow: none !important;
}

html.a11y-high-contrast .btn.outline,
html.a11y-high-contrast .consent-btn-secondary,
html.a11y-high-contrast .filter-buttons .btn,
html.a11y-high-contrast .kp-location-buttons button,
html.a11y-high-contrast #hero-btn2 {
  background: #000000 !important;
  color: #ffd60a !important;
  border: 2px solid #ffd60a !important;
}

html.a11y-high-contrast input,
html.a11y-high-contrast textarea {
  background: #000000 !important;
  color: #ffffff !important;
  border: 2px solid #ffd60a !important;
}

html.a11y-high-contrast .kp-course {
  background: #1f1f1f !important;
  color: #ffd60a !important;
  border: 1px solid #ffd60a !important;
}

html.a11y-high-contrast .price-tag,
html.a11y-high-contrast .team-role,
html.a11y-high-contrast .gtc-tarif-badge,
html.a11y-high-contrast .gtc-upsell-badge,
html.a11y-high-contrast .fpz-hero span {
  background: #000000 !important;
  color: #ffd60a !important;
  border: 1px solid #ffd60a !important;
}

html.a11y-high-contrast .icon,
html.a11y-high-contrast .c-btn,
html.a11y-high-contrast .gtc-tarif-nav {
  background: #000000 !important;
  color: #ffd60a !important;
  border: 1px solid #ffd60a !important;
}

html.a11y-high-contrast .a11y-reading-highlight {
  outline: 3px solid #ffd60a !important;
  background-color: #262200 !important;
}

/* Hoher Kontrast für das Widget selbst */
html.a11y-high-contrast #a11y-toggle {
  background: #ffd60a !important;
  color: #000000 !important;
  border-color: #000000 !important;
}

html.a11y-high-contrast #a11y-panel {
  background: #000000 !important;
  color: #ffffff !important;
  border: 2px solid #ffd60a !important;
}

html.a11y-high-contrast #a11y-panel .a11y-title,
html.a11y-high-contrast #a11y-panel .a11y-font-label,
html.a11y-high-contrast #a11y-panel .a11y-reader-title,
html.a11y-high-contrast #a11y-panel .a11y-reader-note,
html.a11y-high-contrast #a11y-panel .a11y-hint {
  color: #ffffff !important;
}

html.a11y-high-contrast #a11y-panel .a11y-font-row,
html.a11y-high-contrast #a11y-panel .a11y-reader-box,
html.a11y-high-contrast #a11y-panel .a11y-opt,
html.a11y-high-contrast #a11y-panel .a11y-step-btn,
html.a11y-high-contrast #a11y-panel .a11y-reader-btn,
html.a11y-high-contrast #a11y-panel .a11y-click-read-btn,
html.a11y-high-contrast #a11y-panel .a11y-speed-btn,
html.a11y-high-contrast #a11y-panel .a11y-close {
  background: #111111 !important;
  color: #ffffff !important;
  border-color: #ffd60a !important;
}

html.a11y-high-contrast #a11y-panel .a11y-opt[aria-pressed="true"],
html.a11y-high-contrast #a11y-panel .a11y-reader-btn.primary,
html.a11y-high-contrast #a11y-panel .a11y-click-read-btn[aria-pressed="true"],
html.a11y-high-contrast #a11y-panel .a11y-reset {
  background: #ffd60a !important;
  color: #000000 !important;
  border-color: #ffffff !important;
}

html.a11y-high-contrast #a11y-panel .a11y-opt[aria-pressed="true"] .a11y-opt-icon {
  color: #000000 !important;
}

html.a11y-high-contrast #a11y-panel .a11y-opt[aria-pressed="true"] .a11y-opt-state,
html.a11y-high-contrast #a11y-panel .a11y-reader-status.active {
  background: #000000 !important;
  color: #ffd60a !important;
}

html.a11y-high-contrast #a11y-panel .a11y-font-value,
html.a11y-high-contrast #a11y-panel .a11y-opt-icon {
  color: #ffd60a !important;
}

/* 3. Graustufen (ohne position:fixed auf Navbar & Widget zu stören) */
html.a11y-grayscale body > *:not(#a11y-widget):not(#navbar-placeholder),
html.a11y-grayscale #navbar-placeholder .nav-inner {
  filter: grayscale(100%) !important;
}

/* 4. Gut lesbare Schriftart */
html.a11y-readable-font body,
html.a11y-readable-font h1,
html.a11y-readable-font h2,
html.a11y-readable-font h3,
html.a11y-readable-font h4,
html.a11y-readable-font p,
html.a11y-readable-font a,
html.a11y-readable-font li,
html.a11y-readable-font td,
html.a11y-readable-font th,
html.a11y-readable-font span,
html.a11y-readable-font button,
html.a11y-readable-font input,
html.a11y-readable-font textarea,
html.a11y-readable-font summary,
html.a11y-readable-font .headline,
html.a11y-readable-font .sub,
html.a11y-readable-font .card {
  font-family: Arial, Verdana, Helvetica, system-ui, sans-serif !important;
}

/* 5. Erhöhter Text- & Zeilenabstand */
html.a11y-spacing body *:not(#a11y-widget):not(#a11y-widget *) {
  line-height: 1.8 !important;
  letter-spacing: 0.05em !important;
  word-spacing: 0.14em !important;
}

/* 6. Links deutlich hervorheben */
html.a11y-highlight-links a:not(#a11y-widget a) {
  text-decoration: underline !important;
  text-decoration-thickness: 2px !important;
  text-underline-offset: 3px !important;
  outline: 2px solid #fe7a01 !important;
  outline-offset: 2px !important;
  border-radius: 3px;
}

/* 7. Animationen stoppen */
html.a11y-reduce-motion,
html.a11y-reduce-motion *,
html.a11y-reduce-motion *::before,
html.a11y-reduce-motion *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  animation: none !important;
  transition-duration: 0.001ms !important;
  transition: none !important;
  scroll-behavior: auto !important;
}

/* 8. Verstärkter Tastatur-Fokus */
html.a11y-focus-ring a:focus,
html.a11y-focus-ring button:focus,
html.a11y-focus-ring input:focus,
html.a11y-focus-ring textarea:focus,
html.a11y-focus-ring summary:focus,
html.a11y-focus-ring [tabindex]:focus {
  outline: 4px solid #fe7a01 !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 6px rgba(254, 122, 1, 0.25) !important;
}

@media (max-width: 480px) {
  #a11y-widget {
    right: 14px;
    bottom: 14px;
  }
  #a11y-panel {
    right: 14px;
    bottom: 76px;
    width: calc(100vw - 28px);
  }
  .a11y-options {
    grid-template-columns: 1fr;
  }
}
