/* The username + hamburger menu (templates/_user_menu.html).
   Its own file because the markup is an include: every page that pulls in
   _user_menu.html needs these rules, and no page needs them alone.
*/

/* --- user menu (username + hamburger, see _user_menu.html) --- */
.topline-right { margin-left: auto; display: inline-flex; align-items: center; gap: .8rem; }
.topline-right .conn { margin-left: 0; }
.user-menu { position: relative; }
.menu-toggle {
  display: inline-flex; align-items: center; gap: .55rem; min-height: 34px;
  padding: .35rem .5rem .35rem .65rem; border: 1px solid var(--border);
  background: var(--panel-2); color: var(--ink); font: inherit; font-size: .85rem;
  font-weight: 550; cursor: pointer; -webkit-tap-highlight-color: transparent; border-radius: var(--radius-pill);
}
.menu-toggle:hover { background: var(--panel); border-color: var(--muted); }
.menu-user { max-width: 12rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* the three bars: fixed 16px block so the label can never squash them */
.menu-bars { display: inline-flex; flex-direction: column; justify-content: center; gap: 3px; width: 16px; flex: none; }
.menu-bars span { display: block; height: 2px; width: 100%; background: currentColor; transition: transform .12s ease, opacity .12s ease; }
.user-menu.is-open .menu-bars span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.user-menu.is-open .menu-bars span:nth-child(2) { opacity: 0; }
.user-menu.is-open .menu-bars span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }
.menu-dropdown {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 210px; z-index: 60;
  background: var(--panel); border: 1px solid var(--border);
  padding: 4px; box-shadow: var(--shadow); border-radius: var(--radius);
}
.menu-dropdown[hidden] { display: none; }
.menu-email {
  padding: .5rem .6rem; font-size: .72rem; color: var(--muted);
  border-bottom: 1px solid var(--border); margin-bottom: 4px; word-break: break-all;
}
.menu-item {
  display: block; width: 100%; text-align: left; box-sizing: border-box; background: none;
  border: 0; color: var(--ink); padding: .55rem .6rem; font: inherit;
  cursor: pointer; text-decoration: none;
}
.menu-item:hover { background: var(--panel-2); }

