/**
 * bd-drawer.css — EIN Mobile-Menü für alle Seiten (05.10.2026, Variante 1 „klassischer Burger").
 * Markup: template-parts/mobile-drawer.php · Verhalten: js/bd-drawer.js
 * Drawer von rechts, Overlay, Person oben (eingeloggt), Gruppen „Lernbereich" + „Website", Fuß Konto/Abmelden.
 * Design-Tokens wie Lern-Topbar: Hintergrund #fdfcf9, Tinte #193c36, Teal #008979, Aktiv #edf6f2, Gold-Badge #ffbd00.
 */
.bd-drawer-overlay { position: fixed; inset: 0; z-index: 2147483642; /* über Feedback-Button (2147483640) + Coachmark (…641), unter Feedback-Modal (…647) */ background: rgba(25, 60, 54, .45); opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility .2s; }
.bd-drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 2147483643; width: min(320px, 88vw); display: flex; flex-direction: column;
  background: #fdfcf9; color: #193c36; font-family: 'Manrope', system-ui, sans-serif; box-shadow: -12px 0 30px rgba(0, 0, 0, .18);
  transform: translateX(100%); visibility: hidden; transition: transform .24s ease, visibility .24s; overscroll-behavior: contain; }
html.bd-drawer-open .bd-drawer-overlay { opacity: 1; visibility: visible; }
html.bd-drawer-open .bd-drawer { transform: translateX(0); visibility: visible; }
html.bd-drawer-open, html.bd-drawer-open body { overflow: hidden; }

.bd-drawer__head { display: flex; align-items: center; gap: 8px; height: 64px; flex-shrink: 0; padding: 0 10px 0 20px; border-bottom: 1px solid #e3e7e2; }
.bd-drawer__title { flex: 1; font-size: 20px; font-weight: 800; }
.bd-drawer__close { position: relative; width: 44px; height: 44px; cursor: pointer; border-radius: 8px; flex-shrink: 0; }
.bd-drawer__close span { position: absolute; left: 11px; top: 21px; width: 22px; height: 2px; background: #193c36; }
.bd-drawer__close span:nth-child(1) { transform: rotate(45deg); }
.bd-drawer__close span:nth-child(2) { transform: rotate(-45deg); }
.bd-drawer__close:hover { background: #f1f6f3; }

.bd-drawer__body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-bottom: 8px; }

.bd-drawer__who { display: flex; align-items: center; gap: 12px; padding: 16px 20px; background: #edf6f2; border-bottom: 1px solid #e3e7e2; }
.bd-drawer__avatar { width: 42px; height: 42px; flex-shrink: 0; border-radius: 50%; background: #008979; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 800; letter-spacing: .02em; }
.bd-drawer__who-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bd-drawer__who-name { font-size: 15px; font-weight: 700; line-height: 1.3; }
.bd-drawer__who-mail { font-size: 12px; color: #60736e; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.bd-drawer__group { padding: 12px 10px 2px; }
.bd-drawer__label { padding: 0 10px 6px; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #60736e; }
.bd-drawer__item { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 9px 12px; border-radius: 8px;
  font-size: 16px; font-weight: 600; line-height: 1.3; color: #193c36; text-decoration: none; cursor: pointer; transition: background .12s, color .12s; }
.bd-drawer__item:hover { background: #f1f6f3; color: #006e63; text-decoration: none; }
.bd-drawer__item.is-active { color: #006e63; background: #edf6f2;  font-weight: 700; }
.bd-drawer__item i { font-size: 18px; color: #8a8a83; }
.bd-drawer__item:hover i { color: #006e63; }
.bd-drawer__badge { min-width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; border-radius: 20px; background: #ffbd00; color: #193c36; font-size: 11px; font-weight: 800; }

/* Untermenüs (Deutschkurse › A1 … / Prüfungsvorbereitung › …) */
.bd-drawer__parent { display: flex; flex-wrap: wrap; align-items: stretch; }
.bd-drawer__parent > .bd-drawer__item--parent { flex: 1; min-width: 0; }
.bd-drawer__chevron { width: 44px; min-height: 46px; display: flex; align-items: center; justify-content: center; cursor: pointer; border-radius: 8px; flex-shrink: 0; }
.bd-drawer__chevron::before { content: ""; width: 9px; height: 9px; border-right: 2px solid #60736e; border-bottom: 2px solid #60736e; transform: rotate(45deg); transition: transform .15s; margin-top: -4px; }
.bd-drawer__chevron--inline { width: auto; min-height: 0; margin-left: auto; padding-left: 8px; }
.bd-drawer__parent.is-open .bd-drawer__chevron::before { transform: rotate(225deg); margin-top: 4px; }
.bd-drawer__sub { flex-basis: 100%; padding: 2px 0 4px 14px; }
.bd-drawer__sub[hidden] { display: none; }
.bd-drawer__item--sub { min-height: 42px; font-size: 15px; font-weight: 500; }

.bd-drawer__foot { flex-shrink: 0; border-top: 1px solid #e3e7e2; padding: 10px 10px calc(12px + env(safe-area-inset-bottom)); }
.bd-drawer__item--logout { color: #c0392b; }
.bd-drawer__item--logout i { color: #c0392b; }
.bd-drawer__item--logout:hover { background: #fcecea; color: #a5281b; }
.bd-drawer__item--logout:hover i { color: #a5281b; }
.bd-drawer__btn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; margin: 0 10px 8px; padding: 12px; border-radius: 10px;
  background: #008979; color: #fff; font-size: 15px; font-weight: 700; text-decoration: none; }
.bd-drawer__btn:hover { background: #007060; color: #fff; text-decoration: none; }
.bd-drawer__btn--outline { background: #fff; color: #007060; border: 1.5px solid #008979; }
.bd-drawer__btn--outline:hover { background: #edf6f2; color: #006e63; }
.bd-drawer__btn i { font-size: 18px; }

.bd-drawer a:focus-visible, .bd-drawer [role="button"]:focus-visible { outline: 2px solid #008979; outline-offset: -3px; }
.bd-drawer-toggle:focus-visible { outline: 2px solid #008979; outline-offset: -3px; }

/* Öffentlicher Header: der Burger (< 1200 px) ist ein div, kein Bootstrap-Button mehr. */
.bd-public-header .navbar-toggler.bd-drawer-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; cursor: pointer; border: 0; border-radius: 8px; }
@media (max-width: 1199.98px) { .bd-public-header .navbar-toggler.bd-drawer-toggle { display: inline-flex; } }
@media (max-width: 600px) {
  .bd-public-header > .container { flex-wrap: nowrap; padding-left: 12px !important; padding-right: 12px !important; }
  .bd-public-header .navbar-brand { margin-right: 8px; padding-right: 0 !important; }
  .bd-public-header .navbar-brand img { width: 155px; }
}
/* Derselbe Drawer bleibt auch auf Desktop verfügbar. */
@media (prefers-reduced-motion: reduce) { .bd-drawer, .bd-drawer-overlay, .bd-drawer__chevron::before { transition: none; } }

/* Website-Ziele bleiben auf Desktop in jeder Kopfzeile sichtbar. */
.bd-website-nav { display: none; margin-left: 24px; }
@media (min-width: 901px) {
  .bd-website-nav { display: block; }
  .bd-drawer__website { display: none; }
  .bd-topbar__spacer { display: block; flex: 1; }
  .bd-public-header .bd-drawer-toggle { margin-left: auto; }
  .bd-public-header > .container { justify-content: flex-start; }
}

/* Kopfzeile und Untermenüs liegen über Hero und Seiteninhalt. */
.bd-public-header { position: relative; z-index: 100001; overflow: visible; }
.bd-public-header > .container, .bd-topbar__inner, .bd-website-nav { overflow: visible; }
.bd-website-nav .dropdown-menu { z-index: 100002; }

.bd-topbar.navbar { padding: 0; display: block; }

/* Desktop: kompaktes Menü direkt unter dem Burger, ohne Vollbild-Overlay. */
@media (min-width: 901px) {
  .bd-drawer-overlay { display: none; }
  html.bd-drawer-open, html.bd-drawer-open body { overflow: visible; }
  .bd-drawer {
    top: var(--bd-menu-top, 80px); right: var(--bd-menu-right, 24px); bottom: auto;
    width: 300px; max-height: calc(100dvh - var(--bd-menu-top, 80px) - 16px);
    border: 1px solid #e3e7e2; border-radius: 12px;
    box-shadow: 0 8px 28px rgba(0,0,0,.12); transform: translateY(-6px);
    opacity: 0; transition: opacity .15s, transform .15s, visibility .15s;
  }
  html.bd-drawer-open .bd-drawer { transform: translateY(0); opacity: 1; }
  .bd-drawer__head { display: none; }
  .bd-drawer__body { flex: 0 1 auto; }
  .bd-drawer__who { padding: 16px; }
  .bd-drawer__foot { padding: 6px 10px; }
}

/* Website-Dropdowns: derselbe Stil wie das persönliche Desktop-Menü. */
.bd-website-nav .dropdown-menu {
  background: #fdfcf9; border: 1px solid #e3e7e2; border-radius: 12px;
  box-shadow: 0 8px 28px rgba(0,0,0,.12); padding: 6px;
  min-width: 264px; font-family: 'Manrope', system-ui, sans-serif;
}
.bd-website-nav .dropdown-menu .nav-link {
  display: flex; align-items: center; min-height: 46px; padding: 9px 12px;
  border-radius: 8px;
  color: #193c36; font-size: 16px; font-weight: 600; line-height: 1.3;
}
.bd-website-nav .dropdown-menu .nav-link:hover,
.bd-website-nav .dropdown-menu .nav-link:focus-visible {
  background: #f1f6f3; color: #006e63;
}
.bd-website-nav .dropdown-menu .nav-link.active {
  background: #edf6f2;  color: #006e63; font-weight: 700;
}

/* Ein gemeinsamer Menüknopf auf allen Seiten, angemeldet mit Vorname-Initiale. */
.bd-menu-toggle { display: inline-flex; align-items: center; gap: 12px; min-height: 44px;
  padding: 4px 8px; border-radius: 28px; cursor: pointer; flex-shrink: 0; }
.bd-menu-toggle:hover { background: #edf6f2; }
.bd-menu-toggle__avatar { display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%; background: #008979; color: #fff;
  font-family: 'Manrope', system-ui, sans-serif; font-size: 14px; font-weight: 800; }
.bd-menu-toggle__lines { display: flex; flex-direction: column; justify-content: center;
  gap: 5px; width: 28px; height: 36px; }
.bd-menu-toggle__lines > span { display: block; width: 22px; height: 2px; background: #193c36; }
.bd-public-header .bd-menu-toggle { margin-left: auto; }

/* Header controls keep their right-hand anchor with or without a signed-in account. */
.bd-personal-controls { display: flex; align-items: center; flex-shrink: 0; }
.bd-public-header .bd-personal-controls { margin-left: auto; }

/* The compact desktop navigation must fit smaller laptop windows too. */
@media (min-width:901px) and (max-width:1199.98px) {
 .bd-public-header > .container { max-width:none; flex-wrap:nowrap; }
 .bd-public-header .navbar-brand img { width:170px; }
 .bd-public-header .navbar-brand { margin-right:0; padding-right:0 !important; }
 .bd-website-nav { margin-left:16px; }
 .bd-website-nav .navbar-nav { flex-direction:row; margin-bottom:0 !important; }
 .bd-website-nav .nav-link { padding-left:8px; padding-right:8px; font-size:14px; }
}
.bd-drawer { max-height:100vh; max-height:100dvh; }
@media (min-width:901px) {
 .bd-drawer { max-height:calc(100vh - var(--bd-menu-top,80px) - 16px); max-height:calc(100dvh - var(--bd-menu-top,80px) - 16px); }
}
