/* The header's account corner (menu.js): Sign in, or your accounts. Uses style.css tokens.
   Switch off: remove the menu.js script and this stylesheet's link from index.html. */

.acct { position: relative; flex: none; margin-left: auto; }
/* Beside the Discord button, that button takes the free space and this sits at the very end. */
.hd-discord + .acct { margin-left: 4px; }

/* Neither button is a call to action: a hairline-edged Sign in, and a plain tab-like account button. */
.acct-btn {
  display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px;
  background: none; box-shadow: none; color: var(--text); border: 1px solid var(--line-2); border-radius: 8px;
  font: 600 var(--fs-2)/1 var(--body); letter-spacing: 0.08em; text-transform: uppercase;
  transition: border-color 0.2s, background-color 0.2s;
}
.acct-btn::after { display: none; }
.acct-btn:hover, .acct-btn[aria-expanded="true"] { border-color: color-mix(in srgb, var(--accent) 70%, transparent); background: rgba(28, 40, 80, 0.35); }
.acct-btn > svg { width: 16px; height: 16px; flex: none; color: var(--muted); }
.acct-btn.in { padding: 0 10px 0 6px; border-color: transparent; font: 600 var(--fs-4)/1 var(--body); letter-spacing: 0; text-transform: none; }
.acct-btn.in:hover, .acct-btn.in[aria-expanded="true"] { background: var(--panel-2); border-color: transparent; }
.acct-btn .acct-label { max-width: 14ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-btn .acct-chev { width: 10px; height: 8px; transition: transform 0.2s; }
.acct-btn[aria-expanded="true"] .acct-chev { transform: rotate(180deg); }

/* Avatars: Minecraft heads stay pixel-sharp and square, Discord avatars are round, as on the leaderboard. */
.acct-av { width: 26px; height: 26px; flex: none; border-radius: 5px; object-fit: cover; }
.acct-av.minecraft { image-rendering: pixelated; }
.acct-av.discord { border-radius: 50%; }
.acct-av.none { display: grid; place-items: center; background: var(--panel-2); color: var(--muted); font: 700 var(--fs-3)/1 var(--display); }

/* The panel: dark steel with the cards' bright upper edge, small corners. */
.acct-pop {
  position: absolute; z-index: 30; top: calc(100% + 8px); right: 0; width: 272px; padding: 8px;
  background:
    linear-gradient(180deg, rgba(18, 27, 56, 0.99), rgba(9, 14, 32, 0.99)) padding-box,
    linear-gradient(160deg, rgba(225, 233, 255, 0.4), rgba(109, 149, 255, 0.14) 40%, rgba(255, 255, 255, 0.05) 70%, rgba(165, 139, 255, 0.2)) border-box;
  border: 1px solid transparent; border-radius: 10px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.acct-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.acct-row { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 7px; color: var(--text); }
.acct-row:hover, .acct-row:focus-visible { background: var(--panel-2); text-decoration: none; }
.acct-row .acct-av { width: 30px; height: 30px; }
.acct-who { display: grid; min-width: 0; flex: 1; }
.acct-who b { font-weight: 600; font-size: var(--fs-4); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-who small { line-height: 1.3; }
/* The tier as the estimate card's crest, small. */
.acct-crest { position: relative; flex: none; width: 22px; height: 25px; color: var(--c); }
.acct-crest svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.acct-crest path { fill: color-mix(in srgb, var(--c) 14%, transparent); stroke: var(--c); stroke-width: 4; }
.acct-crest b { position: absolute; inset: 0 0 2px; display: grid; place-items: center; font: 700 10px/1 var(--display); letter-spacing: -0.02em; }

/* A rule with a small diamond at its middle, like the line under a heading in an old book. */
.acct-sep { position: relative; height: 1px; margin: 9px 6px; border: 0; background: linear-gradient(90deg, transparent, var(--line-2) 30%, var(--line-2) 70%, transparent); overflow: visible; }
.acct-sep::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; translate: -50% -50%; rotate: 45deg;
  background: #0d1430; border: 1px solid var(--line-2);
}
.acct-item {
  display: block; width: 100%; padding: 8px; border-radius: 7px; text-align: left;
  font: 400 var(--fs-3)/1.3 var(--body); letter-spacing: 0; color: var(--text); background: none; box-shadow: none;
}
button.acct-item { font-weight: 400; }
.acct-item::after { display: none; }
.acct-item:hover, .acct-item:focus-visible { background: var(--panel-2); text-decoration: none; }
.acct-item.quiet { color: var(--muted); }
.acct-item.quiet:hover { color: var(--text); }

/* Sign in: which account, then Continue. */
.acct-form { display: grid; gap: 10px; padding: 6px; }
.acct-h { margin: 0 0 2px; font-size: var(--fs-4); }
.acct-seg { display: flex; margin: 0; padding: 0; border: 0; gap: 4px; }
.acct-seg label { flex: 1; position: relative; }
.acct-seg input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.acct-seg span {
  display: block; padding: 8px 0; border-radius: 7px; text-align: center; cursor: pointer;
  font-size: var(--fs-2); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.acct-seg label:hover span { color: var(--text); }
.acct-seg input:checked + span { color: var(--text); background: var(--panel-2); box-shadow: inset 0 -2px 0 var(--accent); }
.acct-seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.acct-form input[name="q"] {
  width: 100%; font-size: 16px;
}
.acct-form input[name="q"]::placeholder { color: var(--muted); }
.acct-err { margin: -2px 0 0; color: var(--neg); font-size: var(--fs-3); }
.acct-form button { min-height: var(--h-ctl); padding: 0 10px; }

@media (prefers-reduced-motion: reduce) {
  .acct-btn, .acct-btn .acct-chev { transition: none; }
}
