/* Accounts UI (accounts.js). Uses bdoatlas tokens (docs/design.md tokens.css, dark only).
   Gate: python -I tools/check_palette_usage.py */
:root {
  --acc-panel: var(--surface, #102538);
  --acc-panel-2: var(--surface-2, #1b4060);
  --acc-ink: var(--text, #ffffff);
  --acc-dim: var(--text-muted, #aab4be);
  --acc-line: var(--line, #7a8288);
  --acc-accent: var(--accent, #4dc2ea);
  --acc-accent-ink: var(--accent-ink, #0a1824);
  --acc-radius: 6px;
}

.acc-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.65);
}

.acc-modal {
  position: relative;
  width: min(420px, 100%);
  background: var(--acc-panel);
  color: var(--acc-ink);
  border: 1px solid var(--acc-line);
  border-radius: var(--acc-radius);
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.acc-modal h2 {
  margin: 0 0 8px;
  font-family: var(--font-heading, inherit);
  font-size: 1.35rem;
  color: var(--acc-ink);
}

.acc-sub {
  color: var(--acc-dim);
  margin: 0 0 16px;
  font-size: 0.92rem;
  line-height: 1.45;
}

.acc-note {
  color: var(--acc-dim);
  font-size: 0.82rem;
  line-height: 1.4;
  margin: 16px 0 0;
}

.acc-x {
  position: absolute;
  top: 10px;
  right: 12px;
  border: 0;
  background: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--acc-dim);
  cursor: pointer;
  padding: 4px;
}

.acc-x:hover {
  color: var(--acc-ink);
}

.acc-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
  padding: 11px 16px;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
  transition: opacity 0.15s ease;
}

.acc-btn:hover {
  opacity: 0.9;
}

.acc-discord {
  background: #5865f2;
  color: #fff;
}

.acc-steam {
  background: #171a21;
  color: #fff;
  border: 1px solid #7a8288;
}

.acc-login {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  height: 26px;
  border-radius: 3px;
  border: 1px solid var(--line);
  background: var(--primary);
  color: #ffffff;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  box-sizing: border-box;
  transition: opacity 0.15s ease;
}

.acc-login:hover {
  background: var(--primary);
  opacity: 0.9;
}

.acc-user {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  height: 26px;
  border-radius: 3px;
  border: 1px solid var(--acc-line);
  background: var(--surface-2);
  color: var(--acc-ink);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  box-sizing: border-box;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.acc-user:hover {
  border-color: var(--acc-accent);
}

.acc-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}

.acc-wrap {
  position: relative;
  display: inline-block;
}

.acc-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 180px;
  display: grid;
  background: var(--acc-panel);
  border: 1px solid var(--acc-line);
  border-radius: 6px;
  padding: 6px;
  z-index: 100;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

/* display:grid above beats the UA [hidden] rule; without this the menu never closes (checklist.md). */
.acc-menu[hidden] {
  display: none !important;
}

.acc-menu a,
.acc-menu button {
  padding: 8px 12px;
  border: 0;
  background: none;
  text-align: left;
  color: var(--acc-ink);
  font: inherit;
  font-size: 0.88rem;
  text-decoration: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.acc-menu a:hover,
.acc-menu button:hover {
  background: var(--surface-2);
  color: var(--acc-accent);
}

.acc-ts {
  min-height: 70px;
}
