
html,
body {
  position: relative;
  margin: 0;
  height: 100dvh;
  min-height: 100dvh;
  overscroll-behavior-y: none;
  font-size: large;
  overflow: hidden;
}

.profile-menu {
  display: flex;
  flex-direction: column;
  width: 248px;
  gap: 2px;
}

.profile-menu__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 8px 12px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--color-base-300);
}

.profile-menu__avatar {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 9999px;
  object-fit: cover;
  /* The role's color (Premium, Moderator...), with a gap so it reads as a ring */
  box-shadow:
    0 0 0 2px var(--color-base-100),
    0 0 0 4px var(--profile-ring, var(--color-base-300));
}

.profile-menu__identity {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.profile-menu__name {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-menu__email {
  font-size: 0.75rem;
  color: color-mix(in oklch, var(--color-base-content) 60%, transparent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-menu__badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 4px;
  padding: 1px 8px;
  border-radius: 9999px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: color-mix(in oklch, var(--profile-ring, var(--color-secondary)) 18%, transparent);
  color: var(--profile-ring, var(--color-secondary));
}

.profile-menu__note {
  font-size: 0.75rem;
  padding: 6px 8px;
  margin: 0 0 4px;
  border-radius: 0.5rem;
  background: color-mix(in oklch, var(--color-warning) 12%, transparent);
  color: color-mix(in oklch, var(--color-warning) 85%, var(--color-base-content));
}

/* One layout for every row (Gold, Log out): the icons, labels and edges line up */
.profile-menu__row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 36px;
  padding: 6px 8px;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  text-align: left;
}

.profile-menu__icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: color-mix(in oklch, var(--color-base-content) 65%, transparent);
}

.profile-menu__icon--gold {
  color: var(--color-warning);
}

.profile-menu__value {
  margin-left: auto;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.profile-menu__divider {
  height: 1px;
  margin: 2px 8px;
  background: var(--color-base-300);
}

.profile-menu__action {
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.profile-menu__action:hover,
.profile-menu__action:focus-visible {
  background: color-mix(in oklch, var(--color-base-content) 7%, transparent);
  outline: none;
}

.profile-menu__action:focus-visible {
  box-shadow: inset 0 0 0 2px var(--color-primary);
}

