/* ─────────────────────────────────────────────────────────────────────
   User dropdown menu — shared stylesheet
   ---------------------------------------------------------------------
   Single source of truth for the logged-in user menu visuals. Previously
   this CSS lived inline in ~16 HTML files and drifted. Now every page
   that needs the menu does:

       <link rel="stylesheet" href="/auth-header.css">

   Design principles (kept here as a contract for future edits):

   • Monochrome palette anchored on BDS black (#111). No coloured
     accent pills — those read as template scaffolding.
   • Plan info ("Pro · Monthly") is plain small text, not a badge.
   • Hairline 1px border + layered shadow, not a heavy drop-shadow.
   • Tight type rhythm, negative letter-spacing for titles, slightly
     positive for very small caps.
   • Hover states shift background only (not text colour) so the menu
     feels calm under the cursor, not twitchy.
   • Full-bleed dividers — inset dividers read as a template thing.
   ──────────────────────────────────────────────────────────────────── */

.user-menu { position: relative; }

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #111;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  transition: box-shadow 0.18s ease, transform 0.15s ease;
}
.user-avatar:hover {
  box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.08);
  transform: translateY(-1px);
}
.user-avatar:active { transform: translateY(0); }

.user-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  background: #fff;
  border: 1px solid rgba(17, 17, 17, 0.07);
  border-radius: 14px;
  /* Layered shadow: a tight 1px lip for the edge, a mid ambient shadow
     for depth, and a wide soft cast for the "floating over content"
     feeling. Cheaper on the GPU than a single giant blur. */
  box-shadow:
    0 1px 2px rgba(17, 17, 17, 0.04),
    0 10px 28px rgba(17, 17, 17, 0.10),
    0 30px 60px rgba(17, 17, 17, 0.06);
  min-width: 272px;
  padding: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top right;
  transition:
    opacity 0.18s ease,
    visibility 0.18s ease,
    transform 0.18s ease;
  z-index: 200;
  overflow: hidden;
  font-family: inherit;
}
.user-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.user-dropdown-header {
  padding: 18px 18px 14px;
  display: flex;
  align-items: center;
  gap: 13px;
  border-bottom: 1px solid #f1f1f1;
}

.user-dropdown-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #111;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-dropdown-info {
  overflow: hidden;
  min-width: 0;
  flex: 1;
}

.user-dropdown-email {
  font-size: 0.855rem;
  font-weight: 600;
  color: #0a0a0a;
  letter-spacing: -0.005em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.user-dropdown-plan {
  /* Deliberately NOT a badge. Plain small text reads as information
     rather than decoration, which is the premium feel we want. */
  display: block;
  margin-top: 3px;
  font-size: 0.735rem;
  font-weight: 500;
  color: #8a8a8a;
  letter-spacing: 0;
  background: none;
  padding: 0;
  border-radius: 0;
}

.user-dropdown-body {
  padding: 6px;
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 9px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #1a1a1a;
  letter-spacing: -0.003em;
  text-decoration: none;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  font-family: inherit;
  text-align: left;
  transition: background 0.12s ease, color 0.12s ease;
}
.user-dropdown-item:hover {
  background: #f5f5f5;
  color: #0a0a0a;
}
.user-dropdown-item:active { background: #ececec; }

.user-dropdown-item svg {
  color: #9a9a9a;
  flex-shrink: 0;
  transition: color 0.12s ease;
}
.user-dropdown-item:hover svg { color: #555; }

.user-dropdown-divider {
  height: 1px;
  background: #f1f1f1;
  margin: 4px 0;
}

.user-dropdown-item.user-dropdown-logout { color: #b32626; }
.user-dropdown-item.user-dropdown-logout:hover {
  background: #fdf3f3;
  color: #8f1c1c;
}
.user-dropdown-item.user-dropdown-logout svg { color: #b32626; }
.user-dropdown-item.user-dropdown-logout:hover svg { color: #8f1c1c; }
