/**
 * bd-account-menu.css — Vereinheitlichter Account-Button + Dropdown
 * Genutzt im öffentlichen Header (header.php) UND im Dashboard-Topbar (page-profil.php).
 * Look: öffentlicher Teal-Button (Personen-Icon + Vorname + Chevron) + Dropdown.
 * SSOT für das Aussehen — keine Pro-Kontext-Duplikate (CLAUDE.md §6: Design einheitlich).
 */
.bd-acct { position: relative; display: inline-block; }

.bd-acct__btn {
  display: inline-flex; align-items: center; gap: 7px;
  background: #008979; color: #fff; border: none;
  padding: 7px 12px; border-radius: 8px;
  font-family: inherit; font-size: 14px; font-weight: 600; line-height: 1;
  cursor: pointer; transition: background .15s ease;
}
.bd-acct__btn:hover,
.bd-acct.open .bd-acct__btn { background: #007060; color: #fff; }
.bd-acct__btn:focus-visible { outline: 2px solid #ffbd00; outline-offset: 2px; }
.bd-acct__icon { font-size: 18px; }
.bd-acct__chevron { font-size: 16px; opacity: .85; transition: transform .2s ease; }
.bd-acct.open .bd-acct__chevron { transform: rotate(180deg); }

.bd-acct__menu {
  position: absolute; right: 0; top: calc(100% + 8px);
  min-width: 244px; background: #fff;
  border: 1px solid #e8e6df; border-radius: 12px;
  box-shadow: 0 8px 28px rgba(0,0,0,.12);
  padding: 6px; z-index: 1050;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s;
}
.bd-acct.open .bd-acct__menu { opacity: 1; visibility: visible; transform: translateY(0); }

.bd-acct__head { padding: 10px 12px 12px; border-bottom: 1px solid #f0eee8; margin-bottom: 6px; }
.bd-acct__head-name { font-size: 14px; font-weight: 600; color: #1a1a1a; }
.bd-acct__head-mail {
  font-size: 12px; color: #6b6b6b;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.bd-acct__item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 8px;
  font-size: 14px; color: #2c2c2a; text-decoration: none;
  transition: background .12s ease, color .12s ease;
}
.bd-acct__item:hover { background: #f3f6f5; color: #007060; }
.bd-acct__item i { font-size: 18px; color: #8a8a83; transition: color .12s ease; }
.bd-acct__item:hover i { color: #007060; }
.bd-acct__divider { height: 1px; background: #f0eee8; margin: 6px 8px; }

.bd-acct__item--logout { color: #c0392b; }
.bd-acct__item--logout i { color: #c0392b; }
.bd-acct__item--logout:hover { background: #fcecea; color: #a5281b; }
.bd-acct__item--logout:hover i { color: #a5281b; }

/* Auf sehr schmalen Screens nur Icon + Chevron (spart Platz) */
@media (max-width: 575px) { .bd-acct__name { display: none; } }

/* LP-Seiten-Fix (16.07.2026): Das Dist-Theme-CSS macht auf body.learnpress.berufsdeutsch
   JEDEN <button> gold (!important, 0-2-1) — auch diesen. Höhere Spezifität hält ihn teal
   und setzt die erzwungene 52px-Höhe/Padding zurück. */
body.learnpress.berufsdeutsch .bd-acct .bd-acct__btn {
  background-color: #008979 !important;
  border: none !important;
  color: #fff !important;
  height: auto !important;
  padding: 10px 14px !important; /* 05.10.2026: gleiche 44px wie überall (vorher 7px 12px → 36px nur in der Lektion) */
  font-size: 14px !important;
}
body.learnpress.berufsdeutsch .bd-acct .bd-acct__btn:hover,
body.learnpress.berufsdeutsch .bd-acct.open .bd-acct__btn {
  background-color: #007060 !important;
}

/* Gemeinsame, gut erreichbare Kontosteuerung in allen Kopfzeilen. */
.bd-acct__btn { min-height: 42px; padding: 10px 14px; line-height: 1.25; }
.bd-acct__menu[hidden] { display: none; }
.bd-acct__menu { width: 264px; min-width: 0; max-width: calc(100vw - 32px); }
.bd-acct__item { min-height: 44px; }
.bd-acct__item:focus-visible { outline: 2px solid #008979; outline-offset: -2px; }
.bd-acct__head-mail { max-width: 220px; }
@media (max-width: 575px) { .bd-acct__name { display: inline; max-width: 86px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } }

/* Lernbereich im Dropdown (05.10.2026) — gleiche Gruppe wie im Mobile-Drawer */
.bd-acct__label { padding: 8px 12px 4px; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #60736e; }
.bd-acct__item.is-active { background: #edf6f2; color: #006e63; font-weight: 700; }
.bd-acct__item.is-active i { color: #006e63; }
.bd-acct__badge { margin-left: auto; 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; }
