/* /wallet (wallet.html, js/wallet.js): the player's account: profile, credits, packs, memberships and purchases.
   On site.css (tokens, the nav, .btn, .rowhead, .crumb, .fine, .empty, the footer) and hub.css (the nav's account,
   .eyebrow, .credit-icon, avatars, the profile dialog, .skel, .hub-error). Mobile first; 721px and up widens it. */
.acct [hidden], .acct-page dialog [hidden] { display: none !important; } /* site.css has no global [hidden] rule */
.acct.wrap { max-width: 912px; }
.acct { display: flex; flex-direction: column; gap: 28px; padding-block: 22px 72px; min-height: 60vh; }
.acct-body { display: flex; flex-direction: column; gap: inherit; }
.acct-back { margin-bottom: -12px; }
.acct-sec .rowhead { padding-bottom: 12px; }
.acct-sec .rowhead h2 { font-size: 26px; }
.acct .btn:disabled { opacity: 0.6; cursor: default; transform: none; }
.acct .empty { padding: 22px 18px; font-size: 15px; }
.acct .hub-error { padding: 24px 18px; }

/* who they are: avatar, username, Edit profile (js/account.js GP.openProfile) and Sign out */
.acct-me { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 14px 16px; min-height: 64px; }
.acct-avatar { width: 64px; height: 64px; font-size: 28px; box-shadow: 0 0 0 2px var(--line-2); }
.acct-avatar.avatar-letter { font-family: var(--display); }
.acct-avatar-bone { display: block; border-radius: 50%; box-shadow: none; }
.acct-me-name { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.acct-me h1 { font-size: 34px; font-weight: 800; line-height: 1; text-transform: none; overflow-wrap: anywhere; } /* the username as they typed it */
.acct-me-lede { grid-column: 1 / -1; color: var(--muted); font-size: 15px; }
.acct-me-acts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.acct-me > .hub-error { grid-column: 1 / -1; }
.acct-quiet { padding: 8px 2px; border: 0; background: none; color: var(--muted); font: 600 15px/1 var(--body); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.acct-quiet:hover, .acct-quiet:focus-visible { color: var(--cream); }

/* the balance */
.acct-credits { position: relative; padding: 20px 20px 18px; border-radius: 20px; border: 1px solid var(--line-2);
  background: radial-gradient(70% 90% at 100% 0%, rgba(242, 193, 78, 0.14), transparent 70%), linear-gradient(135deg, var(--panel-2), var(--panel)); }
.acct-balance { display: flex; align-items: center; gap: 12px; margin-top: 12px; font: 800 48px/1 var(--display); color: var(--gold); font-variant-numeric: tabular-nums; }
.acct-balance .credit-icon { width: 0.78em; height: 0.78em; }
.acct-credits-hint { margin-top: 10px; color: var(--muted); font-size: 15px; max-width: 52ch; }
.acct-credits.celebrate { animation: acct-pop 0.6s ease; }
@keyframes acct-pop { 40% { transform: scale(1.02); } }

/* coming back from checkout (wallet.js notice): good, bad, pending, info */
.acct-notice { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--line-2); background: var(--panel); font-weight: 600; }
.acct-notice.good { border-color: rgba(79, 227, 193, 0.5); background: rgba(79, 227, 193, 0.08); }
.acct-notice.bad { border-color: rgba(255, 138, 91, 0.5); background: rgba(255, 138, 91, 0.08); }
.acct-notice.pending > span::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 10px; border-radius: 50%; background: var(--gold); vertical-align: 2px; animation: acct-pulse 1.2s ease-in-out infinite; }
@keyframes acct-pulse { 50% { opacity: 0.25; } }

/* credit packs: each card is its buy button; the featured one (a badge) is pink */
.acct-packs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; padding-top: 6px; }
.acct-pack { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; padding: 22px 12px 12px; text-align: center;
  border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); color: var(--cream); font: inherit; cursor: pointer; transition: border-color 0.15s ease, transform 0.15s ease; }
.acct-pack:hover:not(:disabled) { border-color: var(--line-2); transform: translateY(-2px); }
.acct-pack:hover:not(:disabled) .btn.ghost { border-color: var(--cream); }
.acct-pack.featured { border-color: var(--pink); box-shadow: 0 0 0 1px rgba(255, 45, 158, 0.25); }
.acct-pack:disabled { cursor: progress; opacity: 0.75; }
.acct-pack.skel { pointer-events: none; cursor: default; }
.acct-pack-badge { position: absolute; top: 0; left: 50%; transform: translate(-50%, -50%); padding: 5px 9px; border-radius: 999px; background: var(--pink); color: var(--ink); font: 700 11px/1 var(--body); letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.acct-pack-credits { display: flex; align-items: center; gap: 8px; font: 800 30px/1 var(--display); font-variant-numeric: tabular-nums; }
.acct-pack-credits .credit-icon { width: 0.75em; height: 0.75em; }
.acct-pack-detail { color: var(--dim); font-size: 13px; }
.acct-pack .btn { width: 100%; margin-top: 8px; }
.acct-pack .btn:hover { transform: none; }
.acct-fine { margin-top: 14px; font-size: 13px; line-height: 1.5; }
.acct-fine a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }

/* memberships and purchases: one panel, a row each */
.acct-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); overflow: hidden; }
.acct-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 14px; padding: 14px 16px; }
.acct-row + .acct-row { border-top: 1px solid var(--line); }
.acct-row.ended .acct-row-text b { color: var(--muted); } /* "Ended <date>" says the rest; Play still works */
.acct-row-text { flex: 1 1 160px; min-width: 0; }
.acct-row-text b { display: block; font-weight: 600; overflow-wrap: anywhere; }
.acct-row-text small { display: block; margin-top: 2px; color: var(--dim); font-size: 14px; }
.acct-row-text .acct-row-error { margin-top: 6px; color: var(--orange); font-weight: 600; }
.acct-row-side { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.acct-amount { font-weight: 600; font-variant-numeric: tabular-nums; }
.acct-status { padding: 5px 9px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); font: 700 12px/1 var(--body); letter-spacing: 0.04em; text-transform: uppercase; }
.acct-status.pending { color: var(--gold); border-color: rgba(242, 193, 78, 0.45); }
.acct-status.failed, .acct-status.refunded { color: var(--orange); border-color: rgba(255, 138, 91, 0.45); }

/* signed out */
.acct-signin { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 44px 20px; text-align: center; border-radius: 20px; border: 1px solid var(--line-2);
  background: radial-gradient(60% 70% at 50% 0%, rgba(242, 193, 78, 0.12), transparent 70%), var(--panel); }
.acct-signin .credit-icon { width: 56px; height: 56px; }
.acct-signin h1 { font-size: 40px; font-weight: 800; text-transform: uppercase; }
.acct-signin p { color: var(--muted); max-width: 42ch; }
.acct-signin .btn { margin-top: 6px; }

/* the yes/no question (wallet.js ask), on hub.css's dialog look */
.ask-dialog { width: min(400px, calc(100vw - 32px)); }
.ask-dialog .rename-lede:empty { display: none; }

@media (min-width: 721px) {
  .acct { gap: 40px; padding-block: 34px 96px; }
  .acct-me { grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px 22px; }
  .acct-avatar { width: 84px; height: 84px; font-size: 38px; }
  .acct-me h1 { font-size: 48px; }
  .acct-me-lede { grid-column: 2; }
  .acct-me-acts { grid-column: 3; grid-row: 1; justify-content: flex-end; }
  .acct-credits { padding: 26px 28px 24px; }
  .acct-balance { font-size: 72px; }
  .acct-packs { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; } /* four across from 721px */
  .acct-pack-credits { font-size: 34px; }
  .acct-sec .rowhead h2 { font-size: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .acct-credits.celebrate, .acct-notice.pending > span::before { animation: none; }
  .acct-pack { transition: none; }
  .acct-pack:hover:not(:disabled) { transform: none; }
}
