/* The Steam account button in every page's header (js/account.js): a glass "Sign in" pill signed out,
   a round initial signed in, opening a small menu. Loaded by Home and by the pages with the shared header
   (js/site-header.js), so it carries its own colours. */

[data-account] { position: relative; flex: none; display: flex; align-items: center; }

.acct-signin {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px 0 13px; white-space: nowrap;
  border: 1px solid rgba(243, 245, 248, .14); border-radius: 999px; background: rgba(243, 245, 248, .06);
  color: #f3f5f8; text-decoration: none; font: 600 14px/1 var(--font-ui, var(--font-sans)); letter-spacing: .01em;
  transition: border-color .15s, background .15s;
}
.acct-signin:hover { border-color: rgba(243, 245, 248, .45); background: rgba(243, 245, 248, .1); }
.acct-signin svg { width: 16px; height: 16px; flex: none; }

.acct-btn {
  position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; overflow: hidden; cursor: pointer;
  border: 1px solid rgba(0, 204, 255, .55); border-radius: 50%; background: rgba(0, 204, 255, .14); color: #00ccff;
  transition: border-color .15s, background .15s;
}
.acct-btn:hover, .acct-btn[aria-expanded="true"] { border-color: #00ccff; background: rgba(0, 204, 255, .22); }
.acct-avatar { display: grid; place-items: center; width: 100%; height: 100%; font: 700 15px/1 var(--font-ui, var(--font-sans)); }
.acct-avatar svg { width: 17px; height: 17px; }
/* The Steam picture fills the round button over the initial (account.js drops it if it fails to load). */
.acct-img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.acct-btn.acct-has-img { border-color: rgba(243, 245, 248, .28); background: #0a0d13; }
.acct-btn.acct-has-img:hover, .acct-btn.acct-has-img[aria-expanded="true"] { border-color: rgba(243, 245, 248, .7); }
.acct-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.acct-menu {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 70; display: flex; flex-direction: column;
  min-width: 230px; padding: 6px; border: 1px solid rgba(243, 245, 248, .14); border-radius: 12px;
  background: #0a0d13; box-shadow: 0 18px 40px rgba(0, 0, 0, .6);
}
.acct-menu[hidden] { display: none; }
.acct-head { display: flex; align-items: center; gap: 12px; padding: 10px 12px 12px; margin-bottom: 4px; border-bottom: 1px solid rgba(243, 245, 248, .1); }
.acct-head-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.acct-avatar-big { position: relative; flex: none; width: 40px; height: 40px; }
.acct-k { font: 500 12px/1.2 var(--font-ui, var(--font-sans)); color: rgba(243, 245, 248, .5); }
.acct-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 15px/1.3 var(--font-ui, var(--font-sans)); color: #f3f5f8; }
.acct-menu a, .acct-menu button {
  display: block; width: 100%; padding: 10px 12px; border: 0; border-radius: 8px; background: none; cursor: pointer; text-align: left;
  color: rgba(243, 245, 248, .78); text-decoration: none; font: 500 14px/1.3 var(--font-ui, var(--font-sans)); letter-spacing: 0; text-transform: none;
}
.acct-menu a:hover, .acct-menu button:hover, .acct-menu a:focus-visible, .acct-menu button:focus-visible { background: rgba(243, 245, 248, .07); color: #f3f5f8; }
.acct-menu .acct-out { margin-top: 4px; border-top: 1px solid rgba(243, 245, 248, .1); border-radius: 0 0 8px 8px; }

.acct-note {
  position: fixed; top: 80px; right: 16px; z-index: 80; display: flex; align-items: flex-start; gap: 12px;
  max-width: min(380px, calc(100vw - 32px)); padding: 14px 12px 14px 16px; border: 1px solid rgba(255, 120, 120, .45); border-radius: 12px;
  background: #140b0d; box-shadow: 0 18px 40px rgba(0, 0, 0, .6); color: #f3f5f8; font: 400 14px/1.5 var(--font-ui, var(--font-sans));
}
.acct-note p { margin: 0; }
.acct-note button { flex: none; padding: 0 4px; border: 0; background: none; color: rgba(243, 245, 248, .6); font-size: 20px; line-height: 1; cursor: pointer; }
.acct-note button:hover { color: #f3f5f8; }

@media (max-width: 520px) {
  .acct-signin { padding: 0 12px; }
  .acct-signin span { display: none; }
}
