/* FAHT Eingabehilfen, Plugin-Stylesheet */
.fa11y-ui {
  --fa-blue: var(--fa11y-accent, #2678ef);
  --fa-blue-2: color-mix(in srgb, var(--fa-blue) 72%, #fff);
  --fa-ink: #1d1d1f;
  --fa-muted: #6e6e73;
  --fa-bg: rgba(255, 255, 255, .86);
  --fa-tile: rgba(0, 0, 0, .045);
  --fa-tile-h: rgba(0, 0, 0, .085);
  --fa-line: rgba(0, 0, 0, .08);
  --fa-track: rgba(0, 0, 0, .12);
  font-family: inherit;
  line-height: 1.35;
}
:root:is([data-brx-theme="dark"], [data-theme="dark"], .dark) .fa11y-ui {
  --fa-ink: #f5f5f7;
  --fa-muted: #a1a1a6;
  --fa-bg: rgba(28, 28, 30, .86);
  --fa-tile: rgba(255, 255, 255, .06);
  --fa-tile-h: rgba(255, 255, 255, .11);
  --fa-line: rgba(255, 255, 255, .1);
  --fa-track: rgba(255, 255, 255, .18);
}
.fa11y-ui [hidden] { display: none !important; }
.fa11y-ui button { font: inherit; margin: 0; }
.fa11y-ui svg { display: block; flex-shrink: 0; }
.fa11y-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Ausloeser: abgerundetes Quadrat unten links */
.fa11y-trigger {
  position: fixed;
  left: 18px;
  right: auto;
  bottom: 18px;
  z-index: 9000;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 17px;
  color: #fff;
  background: linear-gradient(140deg, var(--fa-blue), var(--fa-blue-2));
  box-shadow: 0 12px 26px -10px color-mix(in srgb, var(--fa-blue) 70%, transparent), inset 0 1px 0 rgba(255, 255, 255, .35);
  cursor: pointer;
  transition: transform .35s cubic-bezier(.33, 1, .68, 1), box-shadow .35s, opacity .25s;
}
.fa11y-trigger:hover { transform: translateY(-2px) rotate(-6deg); }
.fa11y-trigger:focus-visible { outline: 3px solid #0b2a5c; outline-offset: 3px; }
:root:is([data-brx-theme="dark"], [data-theme="dark"], .dark) .fa11y-trigger:focus-visible { outline-color: #fff; }
.fa11y-trigger svg { width: 28px; height: 28px; }
.fa11y-trigger.is-active::after {
  content: "";
  position: absolute;
  top: -3px;
  right: -3px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #34c759;
  border: 2px solid #fff;
}
body.no-scroll .fa11y-trigger, body.fa11y-hide-trigger .fa11y-trigger { opacity: 0; pointer-events: none; }

/* Panel: Glas-Karte ueber dem Ausloeser */
.fa11y-backdrop { position: fixed; inset: 0; z-index: 99998; background: rgba(0, 0, 0, .18); }
.fa11y-panel {
  position: fixed;
  left: 18px;
  bottom: 84px;
  z-index: 99999;
  width: min(400px, calc(100vw - 36px));
  max-height: calc(100dvh - 110px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px 18px 14px;
  border-radius: 26px;
  color: var(--fa-ink);
  background: var(--fa-bg);
  -webkit-backdrop-filter: blur(26px) saturate(1.6);
  backdrop-filter: blur(26px) saturate(1.6);
  border: 1px solid rgba(255, 255, 255, .5);
  box-shadow: 0 30px 70px -20px rgba(11, 42, 92, .45), inset 0 1px 0 rgba(255, 255, 255, .55);
  transform-origin: 30px 100%;
  animation: fa11y-pop .42s cubic-bezier(.33, 1, .68, 1);
  scrollbar-width: thin;
}
:root:is([data-brx-theme="dark"], [data-theme="dark"], .dark) .fa11y-panel { border-color: rgba(255, 255, 255, .1); box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .08); }
@keyframes fa11y-pop { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }

.fa11y-head { display: flex; align-items: center; gap: 12px; padding: 2px 2px 14px; border-bottom: 1px solid var(--fa-line); }
.fa11y-badge { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; color: #fff; background: linear-gradient(140deg, var(--fa-blue), var(--fa-blue-2)); }
.fa11y-badge svg { width: 22px; height: 22px; }
.fa11y-head-tx { flex: 1; min-width: 0; }
.fa11y-title { margin: 0; font-size: 18px; font-weight: 650; letter-spacing: -.01em; line-height: 1.2; color: var(--fa-ink); }
.fa11y-sub { margin: 2px 0 0; font-size: 12.5px; color: var(--fa-muted); }
.fa11y-icon-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 12px;
  color: var(--fa-ink);
  background: var(--fa-tile);
  cursor: pointer;
  transition: background-color .2s, transform .3s;
}
.fa11y-icon-btn:hover { background: var(--fa-tile-h); }
.fa11y-reset:hover svg { transform: rotate(-120deg); transition: transform .4s; }
.fa11y-close { color: #fff; background: var(--fa-blue); }
.fa11y-close:hover { filter: brightness(.9); }
.fa11y-ui button:focus-visible, .fa11y-ui a:focus-visible, .fa11y-ui input:focus-visible { outline: 3px solid var(--fa-blue); outline-offset: 2px; }

.fa11y-h { margin: 16px 2px 8px; font-size: 11.5px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; color: var(--fa-muted); }
.fa11y-grid { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fa11y-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fa11y-tile {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 10px 12px;
  border: 0;
  border-radius: 15px;
  text-align: left;
  font-size: 13.5px;
  font-weight: 550;
  line-height: 1.25;
  color: var(--fa-ink);
  background: var(--fa-tile);
  cursor: pointer;
  transition: background-color .2s, color .2s, transform .2s;
}
.fa11y-grid--3 .fa11y-tile { flex-direction: column; justify-content: center; gap: 7px; min-height: 82px; padding: 12px 6px; text-align: center; font-size: 12.5px; }
.fa11y-tile:hover { background: var(--fa-tile-h); }
.fa11y-tile:active { transform: scale(.97); }
.fa11y-tile-ic { color: var(--fa-blue); display: grid; place-items: center; }
.fa11y-tile[aria-pressed="true"] { color: #fff; background: var(--fa-blue); }
.fa11y-tile[aria-pressed="true"] .fa11y-tile-ic { color: #fff; }
.fa11y-tile[aria-pressed="true"]::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
}
.fa11y-tile[disabled] { opacity: .45; cursor: not-allowed; }
:root:is([data-brx-theme="dark"], [data-theme="dark"], .dark) .fa11y-tile-ic { color: var(--fa-blue-2); }

.fa11y-range { padding: 10px 12px 12px; border-radius: 15px; background: var(--fa-tile); }
.fa11y-range + .fa11y-range { margin-top: 8px; }
.fa11y-range-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; font-size: 13.5px; font-weight: 550; }
.fa11y-range-top label { margin: 0; font-size: 13.5px; font-weight: 550; color: var(--fa-ink); }
.fa11y-range-top output { font-variant-numeric: tabular-nums; font-size: 12.5px; color: var(--fa-muted); }
.fa11y-range-ctl { display: flex; align-items: center; gap: 10px; }
.fa11y-step {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--fa-ink);
  background: var(--fa-tile-h);
  cursor: pointer;
}
.fa11y-step:hover { color: #fff; background: var(--fa-blue); }
.fa11y-step svg { width: 16px; height: 16px; }
.fa11y-ui input[type="range"] {
  flex: 1;
  min-width: 0;
  height: 6px;
  margin: 0;
  border-radius: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: linear-gradient(90deg, var(--fa-blue) var(--p, 0%), var(--fa-track) var(--p, 0%));
  cursor: pointer;
}
.fa11y-ui input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 3px solid var(--fa-blue); box-shadow: 0 2px 6px rgba(0, 0, 0, .2); }
.fa11y-ui input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--fa-blue); box-shadow: 0 2px 6px rgba(0, 0, 0, .2); }

.fa11y-foot { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--fa-line); font-size: 13px; color: var(--fa-blue); text-decoration: none; }
.fa11y-foot:hover { text-decoration: underline; }
:root:is([data-brx-theme="dark"], [data-theme="dark"], .dark) .fa11y-foot { color: var(--fa-blue-2); }

/* Lesemodus */
.fa11y-reader { position: fixed; inset: 0; z-index: 100000; display: flex; flex-direction: column; color: #1d1d1f; background: #fbfaf7; }
:root:is([data-brx-theme="dark"], [data-theme="dark"], .dark) .fa11y-reader { color: #ececec; background: #121212; }
.fa11y-reader-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px max(16px, calc((100% - 720px) / 2)); border-bottom: 1px solid var(--fa-line); }
.fa11y-reader-name { font-size: 13px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; color: var(--fa-blue); }
.fa11y-reader-body { flex: 1; overflow-y: auto; padding: 32px max(20px, calc((100% - 680px) / 2)) 80px; font-size: 20px; line-height: 1.7; }
.fa11y-reader-body:focus { outline: none; }
.fa11y-reader-body :is(h1, h2, h3, h4) { margin: 1.6em 0 .5em; line-height: 1.25; letter-spacing: -.01em; color: inherit; }
.fa11y-reader-body h1 { margin-top: 0; font-size: 34px; }
.fa11y-reader-body h2 { font-size: 27px; }
.fa11y-reader-body :is(h3, h4) { font-size: 22px; }
.fa11y-reader-body p { margin: 0 0 1em; max-width: 66ch; }
.fa11y-reader-body .fa11y-li { padding-left: 1.2em; position: relative; margin-bottom: .5em; }
.fa11y-reader-body .fa11y-li::before { content: ""; position: absolute; left: .2em; top: .7em; width: 7px; height: 7px; border-radius: 50%; background: var(--fa-blue); }
html.fa11y-reading { overflow: hidden; }

/* Position rechts */
.fa11y-ui--right .fa11y-trigger { left: auto; right: 18px; }
.fa11y-ui--right .fa11y-panel { left: auto; right: 18px; transform-origin: calc(100% - 30px) 100%; }

/* Mobil: Bottom-Sheet */
@media (max-width: 600px) {
  .fa11y-trigger { left: 14px; bottom: 14px; width: 48px; height: 48px; border-radius: 15px; }
  .fa11y-ui--right .fa11y-trigger { left: auto; right: 14px; }
  .fa11y-panel, .fa11y-ui--right .fa11y-panel { left: 0; right: 0; bottom: 0; width: 100%; max-height: 86dvh; border-radius: 26px 26px 0 0; padding: 16px 14px calc(14px + env(safe-area-inset-bottom)); transform-origin: 50% 100%; }
  .fa11y-backdrop { background: rgba(0, 0, 0, .35); }
}
@media (prefers-reduced-motion: reduce) { .fa11y-panel { animation: none; } .fa11y-trigger { transition: none; } }

/* Wirkung der Einstellungen auf die Seite */
html.fa11y-c-invert { filter: invert(1) hue-rotate(180deg); }
html.fa11y-c-invert :is(img, video, iframe, .fa11y-trigger, .fa11y-panel, .fa11y-reader) { filter: invert(1) hue-rotate(180deg); }
html.fa11y-c-mono { filter: grayscale(1); }
html.fa11y-c-low { filter: saturate(.4); }
html.fa11y-c-high { filter: saturate(1.9); }
html.fa11y-c-dark body, html.fa11y-c-dark body *:not(.fa11y-ui):not(.fa11y-ui *) {
  background-color: #000 !important;
  background-image: none !important;
  color: #fff !important;
  -webkit-text-fill-color: currentColor !important;
  border-color: #fff !important;
  box-shadow: none !important;
  text-shadow: none !important;
}
html.fa11y-c-dark a:not(.fa11y-ui *), html.fa11y-c-dark a:not(.fa11y-ui *) * { color: #ffe14d !important; }
html.fa11y-c-light body, html.fa11y-c-light body *:not(.fa11y-ui):not(.fa11y-ui *) {
  background-color: #fff !important;
  background-image: none !important;
  color: #000 !important;
  -webkit-text-fill-color: currentColor !important;
  border-color: #000 !important;
  box-shadow: none !important;
  text-shadow: none !important;
}
html.fa11y-c-light a:not(.fa11y-ui *), html.fa11y-c-light a:not(.fa11y-ui *) * { color: #0033b3 !important; }

html.fa11y-links a:not(.fa11y-ui *) {
  text-decoration: underline !important;
  text-decoration-thickness: 2px !important;
  text-underline-offset: 3px !important;
  outline: 2px solid var(--fa11y-accent, #2678ef) !important;
  outline-offset: 2px;
  border-radius: 4px;
  background-color: color-mix(in srgb, var(--fa11y-accent, #2678ef) 14%, transparent) !important;
}
html.fa11y-heads :is(h1, h2, h3, h4, h5, h6):not(.fa11y-ui *) { outline: 2px dashed var(--fa11y-accent, #2678ef) !important; outline-offset: 5px; border-radius: 4px; }
html.fa11y-heads :is(h1, h2, h3, h4, h5, h6):not(.fa11y-ui *)::before {
  display: inline-block;
  margin-right: 10px;
  padding: 3px 7px;
  border-radius: 7px;
  vertical-align: middle;
  font: 700 12px/1 system-ui, sans-serif;
  letter-spacing: 0;
  color: #fff;
  -webkit-text-fill-color: #fff;
  background: var(--fa11y-accent, #2678ef);
}
html.fa11y-heads h1:not(.fa11y-ui *)::before { content: "H1"; }
html.fa11y-heads h2:not(.fa11y-ui *)::before { content: "H2"; }
html.fa11y-heads h3:not(.fa11y-ui *)::before { content: "H3"; }
html.fa11y-heads h4:not(.fa11y-ui *)::before { content: "H4"; }
html.fa11y-heads h5:not(.fa11y-ui *)::before { content: "H5"; }
html.fa11y-heads h6:not(.fa11y-ui *)::before { content: "H6"; }
html.fa11y-font body :is(p, li, a, span, strong, em, small, h1, h2, h3, h4, h5, h6, blockquote, td, th, label, button, input, textarea, select, figcaption, dt, dd):not(.fa11y-ui *):not([class*="fa-"]) {
  font-family: Verdana, Tahoma, "Segoe UI", sans-serif !important;
}
html.fa11y-cursor, html.fa11y-cursor * {
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24'><path d='M5 2.5l13.5 7.8-6.2 1.7-3.4 6.5z' fill='%23111' stroke='%23fff' stroke-width='1.4' stroke-linejoin='round'/></svg>") 8 4, auto !important;
}
html.fa11y-still *, html.fa11y-still *::before, html.fa11y-still *::after {
  animation-duration: .001s !important;
  animation-iteration-count: 1 !important;
  animation-delay: 0s !important;
  transition: none !important;
  scroll-behavior: auto !important;
}
html.fa11y-speak body :is(p, li, h1, h2, h3, h4, h5, h6, blockquote):not(.fa11y-ui *) { cursor: pointer; }
.fa11y-speaking { outline: 3px solid var(--fa11y-accent, #2678ef) !important; outline-offset: 3px; border-radius: 6px; background-color: color-mix(in srgb, var(--fa11y-accent, #2678ef) 12%, transparent) !important; }
