/* ═══════════════════════════════════════════════════════════════════════════
   a11y-button.css – Barrierefreiheit-Panel (v1.2.2)
   /css/ | MoAktor

   Gestaltung: warm, ruhig, einladend. Dieses Panel öffnen Menschen oft
   zum ersten Mal, manchmal in Not. Es soll sich anfühlen wie eine Hand,
   die sanft eine Tür öffnet – nicht wie ein Systemeinstellungsdialog.

   Layout:
     Desktop – zentriert, 560px breit, großzügiger Innenraum
     Mobile  – Bottom-Sheet (von unten aufsteigend, volle Breite)

   ── Changelog ─────────────────────────────────────────────────────────
   v1.2.2 | 16.09.2026 | Firefox-Mobile-Fix (Befund: Oberkante des
          |             Bottom-Sheets wandert beim Ausblenden der
          |             Adressleiste nach unten).
          |
          |             Ursache: max-height: 92vh in der Mobile-Media-
          |             Query. In modernen Browsern ist vh als "Large
          |             Viewport Height" definiert (Höhe bei ausgeblendeter
          |             Adressleiste), also konstant. Der Container
          |             nutzt seit aura-modal.css v1.0.1 100dvh (dynamisch).
          |             Ergebnis: Panel-max-height bleibt stehen, während
          |             Container wächst → bottom-anchored Panel schiebt
          |             seine Oberkante nach unten.
          |
          |             Fix: 92vh → 92dvh in der Mobile-Media-Query.
          |             dvh passt sich an die Adressleiste an, Panel-
          |             Oberkante bleibt relativ zur Unterkante konstant.
          |
          |             Eine Zeile geändert. Kein anderes Verhalten
          |             angefasst.
   v1.2.1 | 16.09.2026 | Fix Spezifitäts-Konflikt zwischen Desktop-
          |             Padding-Override und Mobile-Bottom-Sheet-Regel.
          |
          |             Befund im Feld (Android-Screenshot, 16.09.2026):
          |             Das Bottom-Sheet saß auf Mobil nicht bündig am
          |             unteren Rand, sondern schwebte 24px darüber, und
          |             links/rechts war ein sichtbarer Rand. Die
          |             beabsichtigte edge-to-edge-Optik war damit
          |             verloren.
          |
          |             Ursache: In v1.2.0 wurde der Padding-Override
          |             als `#a11yModal.aura-modal { padding: 24px }`
          |             eingeführt (Spezifität 1-1-0). Die Mobile-Regel
          |             aus v1.1.0 stand unverändert als
          |             `#a11yModal { padding: 0 }` (Spezifität 1-0-0).
          |             Media-Queries fügen keine Spezifität hinzu — also
          |             gewann der höher-spezifische Desktop-Override
          |             auch innerhalb der Mobile-Media-Query.
          |
          |             Fix: Die Mobile-Regel wird auf dieselbe
          |             Spezifität angehoben — `#a11yModal` →
          |             `#a11yModal.aura-modal`. Damit entscheidet
          |             wieder die Quelltext-Reihenfolge.
   v1.2.0 | 16.09.2026 | Modal-Contract-Migration (Welle M1, Pilot für
          |             Plan-Modal1.0). Anpassung an /css/aura-modal.css.
   v1.1.0 | 12.09.2026 | Optik-Überarbeitung: breiter, luftiger,
          |             wärmer. Slider mit ruhigem Verlauf, Radios als
          |             Karten, mobile als Bottom-Sheet.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Anpassungen an aura-modal.css (v1.2.0) ──────────────────────────── */

/* Padding-Override: aura-modal.css setzt var(--space-4, 1rem) = 16px.
   Das A11y-Panel war schon immer 24px großzügiger. */
#a11yModal.aura-modal {
  padding: 24px;
}

/* Backdrop-Override: etwas wärmerer Ton und 6px statt 8px Blur.
   Beide Werte sind unmerklich nah am Default — bewusst beibehalten,
   damit die A11y-Optik exakt die alte bleibt. */
#a11yModal .aura-modal__backdrop {
  background: rgba(6, 10, 18, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

/* ── Panel-Container ────────────────────────────────────────────────── */
/* Seit v1.2.0 ist das Panel ein Kind des .aura-modal-Containers
   (Geschwister des Backdrops). Es braucht explizit position:relative
   und z-index:1, damit es zuverlässig über dem absolut positionierten
   Backdrop schwebt. Beides ist additiv — die Optik unten ist
   unverändert. */
.a11y-modal-content {
  position: relative;
  z-index: 1;

  max-width: 560px;
  width: 100%;
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  background:
    radial-gradient(circle at 20% 0%, rgba(212,175,55,0.08), transparent 60%),
    linear-gradient(165deg, rgba(48,30,26,0.98) 0%, rgba(34,20,17,0.99) 100%);
  border: 1px solid rgba(212,175,55,0.28);
  border-radius: 24px;
  box-shadow:
    0 32px 80px rgba(0,0,0,0.55),
    0 8px 24px rgba(0,0,0,0.35),
    inset 0 1px 0 rgba(255,255,255,0.06);
  padding: 32px 36px 24px;
  color: #f5f0e8;
  font-family: 'Georgia', 'Times New Roman', serif;
  animation: a11yPanelIn 0.28s cubic-bezier(0.22, 0.61, 0.36, 1);
}

@keyframes a11yPanelIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  html:not([data-a11y-reduce-motion="off"]) .a11y-modal-content {
    animation: none;
  }
}

/* ── Header ─────────────────────────────────────────────────────────── */
.a11y-header {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(212,175,55,0.14);
}
.a11y-header h3 {
  color: #e8d8a8;
  font-size: 1.45rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  margin: 0 0 8px 0;
  font-family: 'Georgia', serif;
}
.a11y-subtitle {
  color: rgba(245,240,232,0.6);
  font-size: 0.88rem;
  font-style: italic;
  line-height: 1.55;
  margin: 0;
  max-width: 42ch;
}

/* ── Rows ───────────────────────────────────────────────────────────── */
.a11y-body { margin: 0; }

.a11y-row {
  margin-bottom: 28px;
}
.a11y-row:last-of-type { margin-bottom: 20px; }

.a11y-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 12px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.92rem;
  color: rgba(245,240,232,0.9);
}
.a11y-label > span:first-child {
  letter-spacing: 0.01em;
}
.a11y-value {
  color: #e8d8a8;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  min-width: 5ch;
  text-align: right;
}

.a11y-hint {
  display: block;
  margin-top: 8px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.78rem;
  color: rgba(245,240,232,0.42);
  line-height: 1.5;
}

/* ── Slider – ruhig, warm, mit sichtbarem Fortschritt ───────────────── */
.a11y-slider-wrap {
  position: relative;
  padding: 6px 0;
}

.a11y-row input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 28px;
  background: transparent;
  cursor: pointer;
  margin: 0;
  display: block;
}

/* Track – WebKit: durchgehend, ruhig, mit sanftem Innenlicht */
.a11y-row input[type="range"]::-webkit-slider-runnable-track {
  width: 100%;
  height: 6px;
  background: linear-gradient(
    90deg,
    rgba(212,175,55,0.45),
    rgba(212,175,55,0.12)
  );
  border-radius: 3px;
  border: 1px solid rgba(212,175,55,0.2);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.4);
}
.a11y-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, #f7e6a8, #d4af37 70%);
  border: 2px solid rgba(34,20,17,0.9);
  box-shadow:
    0 2px 8px rgba(0,0,0,0.5),
    0 0 14px rgba(212,175,55,0.4);
  margin-top: -9px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.a11y-row input[type="range"]:hover::-webkit-slider-thumb {
  transform: scale(1.08);
  box-shadow:
    0 3px 10px rgba(0,0,0,0.55),
    0 0 22px rgba(212,175,55,0.6);
}
.a11y-row input[type="range"]:focus-visible {
  outline: none;
}
.a11y-row input[type="range"]:focus-visible::-webkit-slider-thumb {
  box-shadow:
    0 0 0 var(--a11y-focus-ring, 3px) rgba(212,175,55,0.35),
    0 3px 10px rgba(0,0,0,0.55),
    0 0 22px rgba(212,175,55,0.6);
}

/* Track + Thumb – Firefox */
.a11y-row input[type="range"]::-moz-range-track {
  width: 100%;
  height: 6px;
  background: linear-gradient(
    90deg,
    rgba(212,175,55,0.45),
    rgba(212,175,55,0.12)
  );
  border-radius: 3px;
  border: 1px solid rgba(212,175,55,0.2);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.4);
}
.a11y-row input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #f7e6a8, #d4af37 70%);
  border: 2px solid rgba(34,20,17,0.9);
  box-shadow:
    0 2px 8px rgba(0,0,0,0.5),
    0 0 14px rgba(212,175,55,0.4);
  cursor: pointer;
}

/* ── Radios – als Karten ────────────────────────────────────────────── */
.a11y-fieldset {
  border: none;
  padding: 0;
  margin: 0 0 8px 0;
}
.a11y-legend {
  display: block;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.92rem;
  color: rgba(245,240,232,0.9);
  letter-spacing: 0.01em;
  margin-bottom: 12px;
  padding: 0;
}
.a11y-radios {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.a11y-radio {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(212,175,55,0.045);
  border: 1px solid rgba(212,175,55,0.12);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.9rem;
  color: rgba(245,240,232,0.92);
}
.a11y-radio:hover {
  background: rgba(212,175,55,0.09);
  border-color: rgba(212,175,55,0.28);
}
.a11y-radio:has(input:checked) {
  background: rgba(212,175,55,0.14);
  border-color: rgba(212,175,55,0.5);
}
.a11y-radio:has(input:focus-visible) {
  outline: var(--a11y-focus-ring, 3px) solid rgba(212,175,55,0.35);
  outline-offset: 2px;
}
.a11y-radio input[type="radio"] {
  accent-color: #d4af37;
  width: 18px;
  height: 18px;
  margin: 0;
  flex-shrink: 0;
}

/* ── Footer ─────────────────────────────────────────────────────────── */
.a11y-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid rgba(212,175,55,0.14);
}
.a11y-btn {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.88rem;
  padding: 11px 22px;
  border-radius: 12px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
  letter-spacing: 0.02em;
  font-weight: 500;
}
.a11y-btn:active { transform: translateY(1px); }
.a11y-btn:focus-visible {
  outline: var(--a11y-focus-ring, 3px) solid rgba(212,175,55,0.5);
  outline-offset: 2px;
}

.a11y-btn--ghost {
  background: transparent;
  border-color: rgba(212,175,55,0.28);
  color: rgba(245,240,232,0.8);
}
.a11y-btn--ghost:hover {
  background: rgba(212,175,55,0.08);
  border-color: rgba(212,175,55,0.5);
  color: #f5f0e8;
}

.a11y-btn--primary {
  background: linear-gradient(160deg, rgba(212,175,55,0.32), rgba(212,175,55,0.18));
  border-color: rgba(212,175,55,0.55);
  color: #e8d8a8;
  font-weight: 600;
}
.a11y-btn--primary:hover {
  background: linear-gradient(160deg, rgba(212,175,55,0.45), rgba(212,175,55,0.25));
  border-color: #d4af37;
  color: #fff;
}

/* ── Screenreader-only ──────────────────────────────────────────────── */
.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;
}

/* ═══════════════════════════════════════════════════════════════════════
   MOBILE – Bottom-Sheet
   ═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  /* v1.2.1 (Fix): Selektor auf #a11yModal.aura-modal angehoben, damit
     der Padding-Override aus v1.2.0 nicht mehr gewinnt. Siehe Changelog. */
  #a11yModal.aura-modal {
    padding: 0;
    align-items: flex-end;
  }
  .a11y-modal-content {
    max-width: 100%;
    width: 100%;
    /* v1.2.2 (Fix): 92vh → 92dvh.
       In modernen Browsern ist vh als "Large Viewport Height" definiert
       (Höhe bei ausgeblendeter Adressleiste), also konstant. Der Container
       nutzt seit aura-modal.css v1.0.1 100dvh (dynamisch). Ergebnis vor
       dem Fix: Panel-max-height blieb stehen, während Container wuchs →
       bottom-anchored Panel schob seine Oberkante nach unten. dvh passt
       sich an die Adressleiste an, Oberkante bleibt relativ zur Unterkante
       konstant. Der vh-Fallback bleibt für Browser ohne dvh-Support. */
    max-height: 92vh;
    max-height: 92dvh;
    border-radius: 24px 24px 0 0;
    padding: 24px 22px 18px;
    animation: a11ySheetIn 0.32s cubic-bezier(0.22, 0.61, 0.36, 1);
  }
  @keyframes a11ySheetIn {
    from { opacity: 0; transform: translateY(40px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  @media (prefers-reduced-motion: reduce) {
    html:not([data-a11y-reduce-motion="off"]) .a11y-modal-content {
      animation: none;
    }
  }

  .a11y-header { margin-bottom: 22px; padding-bottom: 16px; }
  .a11y-header h3 { font-size: 1.25rem; }
  .a11y-subtitle { font-size: 0.85rem; }

  .a11y-row { margin-bottom: 24px; }

  .a11y-footer {
    flex-direction: column-reverse;
    align-items: stretch;
    margin-top: 22px;
    padding-top: 18px;
  }
  .a11y-btn {
    width: 100%;
    text-align: center;
    padding: 13px 20px;
    font-size: 0.92rem;
  }
}

/* Sehr kleine Viewports */
@media (max-width: 380px) {
  .a11y-modal-content { padding: 20px 16px 14px; }
  .a11y-header h3 { font-size: 1.15rem; }
  .a11y-radio { padding: 10px 12px; font-size: 0.85rem; }
}