/* Profile / account menu — sidebar avatar button + anchored popover.
   BM.7 (Plan 42.0). Mirrors the .sess-ctx-menu primitive in drawer.css. */

/* ── Avatar button in the drawer footer ─────────────────────────────────────── */

.profile-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.4rem 0.5rem;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: oklch(var(--bc));
  transition: background 0.1s;
}

.profile-btn:hover { background: oklch(var(--b3)); }

.profile-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: oklch(var(--p));
  color: oklch(var(--pc));
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
}

.profile-name {
  font-size: 0.85rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Anchored popover menu ───────────────────────────────────────────────────
   Same fixed-position / clamp model as .sess-ctx-menu so positioning JS is shared. */

.profile-menu {
  position: fixed;
  z-index: 600;
  min-width: 160px;
  background: oklch(var(--b2));
  border: 1px solid oklch(var(--b3));
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-tooltip);
  padding: 4px 0;
  display: flex;
  flex-direction: column;
}

.profile-menu.hidden { display: none; }

.profile-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 0.85rem;
  color: oklch(var(--bc));
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background 0.1s;
}

.profile-menu-item:hover { background: oklch(var(--b3)); }

.profile-menu-logout { color: oklch(var(--er)); }
