/* static/top_right_pill.css
   IMPORTANT:
   - The pill itself must NOT be fixed/absolute.
   - Nav/Shell owns placement (topbar__right flex row).
   - Only the dropdown menu is absolute.
*/

.top-right-pill{
  position: relative;        /* anchor dropdown */
  display: inline-flex;      /* stay inline in the right-side flex row */
  align-items: center;
  flex: 0 0 auto;            /* never stretch */
  width: auto;
  margin: 0;
  padding: 0;
}

/* The clickable pill button */
.pill-btn{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 12px;

  border-radius: 999px;
  border: 1px solid var(--border, rgba(255,255,255,.10));
  background: color-mix(in srgb, var(--bg-elevated, rgba(255,255,255,.04)) 88%, transparent);
  color: var(--text, #fff);

  cursor: pointer;
  user-select: none;
}

.pill-btn:hover{
  background: rgba(255,255,255,.06);
}

.pill-avatar{
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pill-avatar--anon{
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.10);
  font-size: 12px;
}

.pill-label{
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Dropdown menu */
.pill-menu{
  position: absolute;
  top: calc(100% + 8px);
  right: 0;

  min-width: 220px;
  padding: 10px;
  border-radius: 14px;

  border: 1px solid var(--border, rgba(255,255,255,.10));
  background: color-mix(in srgb, var(--bg-elevated, rgba(20,20,20,.92)) 92%, transparent);
  backdrop-filter: blur(12px);

  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  z-index: 3000;
}

.pill-item{
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;

  padding: 10px 10px;
  border-radius: 10px;

  border: 1px solid transparent;
  background: transparent;
  color: var(--text, #fff);

  cursor: pointer;
  font-size: 14px;
}

.pill-item:hover{
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.08);
}

.pill-item.danger{
  color: rgba(255,120,120,.95);
}

.pill-sep{
  height: 1px;
  margin: 8px 2px;
  background: rgba(255,255,255,.08);
}
