/* Accounts UI (accounts.js). Uses AlbionMeta design tokens. */
:root {
  --acc-panel: var(--surface, #202226);
  --acc-ink: var(--text, #fdfdfd);
  --acc-dim: var(--text-muted, #9aa1a9);
  --acc-line: var(--line, #3a3d41);
  --acc-accent: var(--brand, #0d6efd);
  --acc-accent-ink: var(--on-brand, #ffffff);
  --acc-radius: 8px;
}

.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.5);
  font-family: inherit;
}

.acc-modal h2 {
  margin: 0 0 6px;
  font-size: 1.25rem;
  font-weight: 700;
}

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

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

.acc-x {
  position: absolute;
  top: 12px;
  right: 14px;
  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: 8px;
  margin-top: 10px;
  padding: 11px 14px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
  border: 0;
}

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

.acc-steam {
  background: #171a21;
  color: #fff;
  border: 1px solid #2a475e;
}
.acc-steam:hover {
  background: #2a475e;
}

.acc-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  border: none;
  background: var(--brand, #0d6efd);
  color: var(--on-brand, #ffffff);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.acc-login:hover {
  opacity: 0.9;
}

.acc-user {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  border: 1px solid var(--acc-line);
  background: var(--surface-2, #2b2e33);
  color: var(--acc-ink);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.acc-user:hover {
  border-color: var(--acc-accent);
}

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

.acc-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 190px;
  display: grid;
  background: var(--surface, #202226);
  border: 1px solid var(--acc-line);
  border-radius: 8px;
  padding: 6px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  z-index: 100;
}

/* IMPORTANT: display: none !important beats display: grid above so menu closes properly */
.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.85rem;
  text-decoration: none;
  border-radius: 6px;
  cursor: pointer;
}

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

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