/* === Globale Bar (Mobile) + Vertikale Fahnen-Tabs (Desktop) === */

/* === DESKTOP: Vertikale Fahnen-Tabs am linken Bildschirmrand === */
.a11y-side-tabs {
  position: fixed;
  left: 0;
  bottom: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: .55rem;
  z-index: 9998;
}
.a11y-side-tab {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: .6rem;
  border: none;
  border-radius: 0 12px 12px 0;
  padding: .75rem 1rem .75rem .85rem;
  cursor: pointer;
  color: #fff;
  font-family: 'Manrope', sans-serif;
  box-shadow: 0 6px 18px rgba(34, 69, 105, .28), 0 2px 6px rgba(34, 69, 105, .15);
  transition: padding-right .2s, box-shadow .25s, background-color .2s;
  outline: none;
  min-width: 170px;
}
.a11y-side-tab:hover {
  padding-right: 1.4rem;
  box-shadow: 0 12px 32px rgba(34, 69, 105, .35), 0 4px 12px rgba(34, 69, 105, .22);
}
.a11y-side-tab:focus, .a11y-side-tab:focus-visible { outline: none; }
.a11y-side-tab svg { width: 20px; height: 20px; flex-shrink: 0; }
.a11y-side-tab .tab-text {
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
}
.a11y-side-tab--lang { background: var(--blue, #769cbe); }
.a11y-side-tab--lang:hover { background: #5b85a9; }
.a11y-side-tab--a11y { background: var(--ink, #224569); }
.a11y-side-tab--a11y:hover { background: var(--navy-2, #1d3d5f); }

/* Bestehende Round-Toggles unten rechts auf Desktop ausblenden — Fahnen ersetzen sie */
@media(min-width:901px){
  #a11y-widget .a11y-toggle { display: none !important; }
  .a11y-lang-toggle { display: none !important; }
}

/* Mobile: Side-Tabs ausblenden, Bottom-Bar aktiv */
@media(max-width:900px){
  .a11y-side-tabs { display: none !important; }
}

/* === Panels auf Desktop neben den Fahnen anzeigen (links unten) === */
@media(min-width:901px){
  #a11y-widget .a11y-panel {
    position: fixed !important;
    left: calc(170px + .85rem) !important;
    top: auto !important;
    right: auto !important;
    transform-origin: left bottom !important;
  }
  /* Multilingual-Panel beim oberen Tab */
  #a11y-widget .a11y-lang-panel {
    bottom: calc(1.75rem + 50px + .55rem) !important;
    transform: translateX(-12px) scale(.96) !important;
    width: 280px !important;
  }
  #a11y-widget .a11y-lang-panel.open {
    transform: translateX(0) scale(1) !important;
  }
  /* Barrierefreiheits-Panel beim unteren Tab */
  #a11y-widget .a11y-panel:not(.a11y-lang-panel) {
    bottom: 1.75rem !important;
    transform: translateX(-12px) scale(.96) !important;
    width: 280px !important;
  }
  #a11y-widget .a11y-panel:not(.a11y-lang-panel).open {
    transform: translateX(0) scale(1) !important;
  }
}

/* === MOBILE: Geteilte Bar (Barrierefreiheit | Multilingual) === */
@media(max-width:900px){
  .a11y-bar.a11y-bar-split,
  #a11y-widget .a11y-bar {
    display:flex !important;
    align-items:stretch !important;
    justify-content:stretch !important;
    gap:0 !important;
    width:100% !important;
    background:var(--blue, #769cbe) !important;
    color:#fff !important;
    border:none !important;
    border-top:2px solid rgba(255,255,255,.2) !important;
    padding:0 !important;
    cursor:default !important;
    font-family:'Manrope',sans-serif !important;
  }
}
.a11y-bar-half {
  flex:1 1 50% !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:.5rem !important;
  background:transparent !important;
  color:#fff !important;
  border:none !important;
  padding:.7rem 1rem !important;
  cursor:pointer !important;
  font-family:inherit !important;
  font-size:.72rem !important;
  font-weight:700 !important;
  letter-spacing:.09em !important;
  text-transform:uppercase !important;
  transition:background .2s !important;
  outline:none !important;
}
.a11y-bar-half:hover { background:rgba(255,255,255,.10) !important; }
.a11y-bar-half--left { border-right:1px solid rgba(255,255,255,.25) !important; }
.a11y-bar-half:focus, .a11y-bar-half:focus-visible { outline:none !important; }

/* === Sprachen-Panel — Scroll-Verhalten === */
.a11y-lang-panel {
  display:flex !important;
  flex-direction:column !important;
  gap:.15rem !important;
  max-height:70vh !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  -webkit-overflow-scrolling:touch !important;
  touch-action:pan-y !important;
  overscroll-behavior:contain !important;
  overscroll-behavior-y:contain !important;
}
/* Mobile: Panel als fixed-positionierter Bottom-Sheet — garantiert scrollbar auf iOS/Android */
@media(max-width:900px){
  #a11y-widget .a11y-lang-panel {
    position:fixed !important;
    left:.5rem !important;
    right:.5rem !important;
    bottom:calc(46px + .5rem) !important;
    top:auto !important;
    width:auto !important;
    max-width:none !important;
    max-height:55vh !important;
    transform:translateY(10px) scale(.98) !important;
    transform-origin:bottom center !important;
    background:#fff !important;
    border-radius:14px !important;
    padding:.7rem !important;
    box-shadow:0 -8px 32px rgba(34,69,105,.20), 0 -2px 8px rgba(34,69,105,.10) !important;
    z-index:9999 !important;
  }
  #a11y-widget .a11y-lang-panel.open {
    transform:translateY(0) scale(1) !important;
  }
}
@media(max-width:640px){
  #a11y-widget .a11y-lang-panel { max-height:50vh !important; }
}

.a11y-lang-panel::-webkit-scrollbar { width:6px; }
.a11y-lang-panel::-webkit-scrollbar-track { background:transparent; }
.a11y-lang-panel::-webkit-scrollbar-thumb { background:rgba(34,69,105,.18); border-radius:3px; }
.a11y-lang-panel::-webkit-scrollbar-thumb:hover { background:rgba(34,69,105,.32); }

.a11y-lang-btn {
  display:flex !important;
  align-items:center !important;
  gap:.7rem !important;
  width:100% !important;
  padding:.6rem .75rem !important;
  background:transparent !important;
  border:none !important;
  border-radius:10px !important;
  cursor:pointer !important;
  font-family:inherit !important;
  font-size:.88rem !important;
  font-weight:600 !important;
  color:var(--ink, #224569) !important;
  text-align:left !important;
  transition:background .15s !important;
}
.a11y-lang-btn:hover { background:var(--off-2, #edf0f5) !important; }
.a11y-lang-btn.active { background:rgba(115,38,34,.08) !important; color:var(--terra, #732622) !important; }
.a11y-lang-btn .lang-flag { font-size:1.1rem; flex-shrink:0; }
.a11y-lang-btn small {
  color:var(--muted, #5c7a9a);
  font-weight:500;
  font-size:.78rem;
  margin-left:.15rem;
}

/* Google Translate Banner verstecken */
.goog-te-banner-frame, .skiptranslate { display:none !important; }
body { top:0 !important; }
