/* Block Zero Games – shared wallet window (bz-wallet.js). Glass, neutral; the accent of each game via --bzw-accent. */
.bzw, .bzw-solo { --bzw-ok: #2ee6a8; --bzw-bad: #ff5d73; --bzw-line: rgba(255,255,255,.14); --bzw-txt: #eef3fb; --bzw-mut: #8f9bb0;
  --bzw-disp: var(--disp, "Orbitron", system-ui, sans-serif); --bzw-body: var(--body, "Inter", system-ui, sans-serif);
  color: var(--bzw-txt); font-family: var(--bzw-body); }
.bzw { display: flex; flex-direction: column; gap: 12px; height: 100%; min-height: 0; }
.bzw [hidden] { display: none !important; }
.bzw i.bzw-i { display: block; width: 22px; height: 22px; font-style: normal; }
.bzw i.bzw-i svg { width: 100%; height: 100%; display: block; }

/* top: decoration · balance · gas */
.bzw-top { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 20px; border: 1px solid color-mix(in srgb, var(--bzw-accent, #ffd54a) 40%, transparent);
  background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--bzw-accent, #ffd54a) 16%, transparent), rgba(5,7,10,.42)); box-shadow: inset 0 1px 0 rgba(255,255,255,.1); }
.bzw-deco { flex: none; display: grid; place-items: center; }
.bzw-sum { display: grid; gap: 8px; min-width: 0; flex: 1; container-type: inline-size; }
.bzw-balrow { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; min-width: 0; }
/* the big balance always fits its card: size from the card width (cqi), never wider than the old 8vw / 40 px */
.bzw-bal { font: 900 clamp(18px, min(8vw, 13cqi), 40px)/1 var(--bzw-disp); white-space: nowrap; color: var(--bzw-txt); font-variant-numeric: tabular-nums; text-shadow: 0 2px 12px color-mix(in srgb, var(--bzw-accent, #ffd54a) 30%, transparent); }
.bzw-unit { font: 800 13px var(--bzw-disp); color: var(--bzw-accent, #ffd54a); letter-spacing: .12em; }
.bzw-gas { justify-self: start; display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 6px 0 12px; border-radius: 999px; border: 1px solid var(--bzw-line);
  background: rgba(5,7,10,.5); color: var(--bzw-mut); cursor: pointer; font: inherit; }
.bzw-gas b { font: 800 14px var(--bzw-disp); color: var(--bzw-txt); font-variant-numeric: tabular-nums; }
.bzw-gas small { font-size: 11.5px; }
.bzw-gas.low { border-color: color-mix(in srgb, var(--bzw-bad) 60%, transparent); }
.bzw-dot { width: 10px; height: 10px; border-radius: 50%; background: #8592a8; flex: none; }
.bzw-gas.ok .bzw-dot, .bzw-row.ok .bzw-dot { background: var(--bzw-ok); box-shadow: 0 0 10px var(--bzw-ok); }
.bzw-gas.low .bzw-dot, .bzw-row.low .bzw-dot { background: var(--bzw-bad); box-shadow: 0 0 10px var(--bzw-bad); animation: bzwPulse 1.4s ease-in-out infinite; }
.bzw-w { font: 800 10px var(--bzw-disp); letter-spacing: .1em; text-transform: uppercase; padding: 4px 8px; border-radius: 99px; }
.bzw-w:empty { display: none; }
.ok > .bzw-w { color: #03130d; background: var(--bzw-ok); }
.low > .bzw-w { color: #2a0008; background: #ff8a9a; }

/* the action grid: coins with their name */
.bzw-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.bzw-act { position: relative; display: grid; justify-items: center; align-content: center; gap: 6px; min-width: 0; min-height: 88px; padding: 10px 4px; border-radius: 18px;
  border: 1px solid var(--bzw-line); background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(5,7,10,.45)); box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 6px 0 -2px rgba(0,0,0,.45);
  color: var(--bzw-txt); text-decoration: none; font: inherit; cursor: pointer; transition: transform .1s, border-color .2s; }
.bzw-act:hover { border-color: var(--bzw-accent, #ffd54a); }
.bzw-act:active { transform: translateY(2px) scale(.97); }
.bzw-ic { position: relative; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--bzw-accent, #ffd54a) 55%, #fff), var(--bzw-accent-2, #f7a21a) 72%); color: var(--bzw-on-accent, #2a1700); box-shadow: inset 0 -3px 0 rgba(0,0,0,.18), 0 4px 10px rgba(0,0,0,.35); }
.bzw-grey .bzw-ic { background: radial-gradient(circle at 35% 30%, #d9e2f0, #7d8aa3 72%); color: #141b26; }
.bzw-rd { position: absolute; top: -3px; right: -4px; width: 12px; height: 12px; border-radius: 50%; background: var(--bzw-bad); border: 2px solid #121822; }
.bzw-l { max-width: 100%; font: 700 11.5px/1.15 var(--bzw-body); text-align: center; }
.bzw-v { font: 800 11px var(--bzw-disp); color: var(--bzw-accent, #ffd54a); }

/* a page */
.bzw-page { display: flex; flex-direction: column; gap: 12px; min-height: 0; flex: 1; }
.bzw-page.bzw-in { animation: bzwIn .22s ease-out; }
.bzw-ph { display: flex; align-items: center; gap: 10px; }
.bzw-ph h3 { display: flex; align-items: center; gap: 8px; margin: 0; font: 700 13px var(--bzw-disp); letter-spacing: .12em; text-transform: uppercase; color: var(--bzw-txt); }
.bzw-ph h3 .bzw-i { color: var(--bzw-accent, #ffd54a); width: 20px; height: 20px; }
.bzw-back { width: 44px; height: 44px; flex: none; display: grid; place-items: center; padding: 0; border-radius: 50%; border: 1px solid var(--bzw-line); background: rgba(5,7,10,.5); color: var(--bzw-txt); cursor: pointer; }
.bzw-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 50px; padding: 0 18px; border-radius: 999px; border: 0; cursor: pointer; text-decoration: none;
  font: 800 15px var(--bzw-body); color: #03130d; background: linear-gradient(180deg, #5ff3c2, #22c88f); box-shadow: 0 0 0 1px rgba(95,243,194,.4), 0 8px 22px -8px rgba(46,230,168,.7); }
.bzw-btn:disabled { opacity: .45; cursor: default; }
.bzw-btn.bzw-ghost { color: var(--bzw-txt); background: rgba(5,7,10,.5); box-shadow: inset 0 0 0 1px var(--bzw-line); }
.bzw-btn.bzw-danger { color: #2a0008; background: linear-gradient(180deg, #ff8a9a, #e0405a); box-shadow: 0 0 0 1px rgba(255,138,154,.5); }
.bzw-btn.bzw-sm { width: auto; min-height: 44px; padding: 0 14px; font-size: 13px; margin-left: auto; }
.bzw-btn .bzw-i { width: 18px; height: 18px; }
.bzw-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 16px; border: 1px solid var(--bzw-line); background: rgba(255,255,255,.04); }
.bzw-row b { font: 800 16px var(--bzw-disp); white-space: nowrap; font-variant-numeric: tabular-nums; }
.bzw-recv { display: grid; justify-items: center; gap: 12px; }
.bzw-qr { width: min(180px, 46vw); aspect-ratio: 1; padding: 8px; border-radius: 16px; background: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.bzw-qr svg { width: 100%; height: 100%; display: block; }
.bzw-addr { max-width: 100%; padding: 8px 12px; border-radius: 12px; background: rgba(5,7,10,.55); border: 1px solid var(--bzw-line); font-size: 12.5px; word-break: break-all; text-align: center; }
.bzw-btns { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; width: 100%; }
.bzw-win { display: flex; align-items: baseline; justify-content: center; gap: 10px; padding: 16px; border-radius: 18px; border: 1px solid var(--bzw-line); color: var(--bzw-mut); }
.bzw-win.on { color: var(--bzw-accent, #ffd54a); border-color: color-mix(in srgb, var(--bzw-accent, #ffd54a) 50%, transparent); background: radial-gradient(120% 140% at 50% 0%, color-mix(in srgb, var(--bzw-accent, #ffd54a) 18%, transparent), rgba(5,7,10,.4)); }
.bzw-win .bzw-i { width: 28px; height: 28px; align-self: center; }
.bzw-win b { font: 900 30px var(--bzw-disp); color: var(--bzw-txt); }
.bzw-his { list-style: none; margin: 0; padding: 0; flex: 1; min-height: 120px; display: grid; align-content: start; gap: 6px; }
.bzw-his li { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: 10px; height: 40px; padding: 0 10px; border-radius: 12px; border: 1px solid var(--bzw-line); background: rgba(255,255,255,.03); }
.bzw-his li .bzw-i { width: 20px; height: 20px; color: var(--bzw-accent, #ffd54a); }
.bzw-his li span { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bzw-his li small { margin-left: 8px; color: var(--bzw-mut); font-size: 11px; }
.bzw-his li b { font: 700 13px var(--bzw-disp); color: var(--bzw-mut); }
.bzw-his li b.up { color: var(--bzw-ok); } .bzw-his li b.down { color: #ff9aa8; }
.bzw-his li.bzw-empty { display: flex; justify-content: center; gap: 8px; height: 60px; color: var(--bzw-mut); }
.bzw-pager { display: flex; justify-content: center; align-items: center; gap: 12px; font: 700 12px var(--bzw-disp); color: var(--bzw-mut); }
.bzw-pager:empty { display: none; }
.bzw-pg { width: 44px; height: 40px; border-radius: 12px; border: 1px solid var(--bzw-line); background: rgba(5,7,10,.45); color: var(--bzw-txt); font-size: 18px; cursor: pointer; }
.bzw-pg:disabled { opacity: .35; cursor: default; }
/* status line = a short toast at the bottom of the window (bz-wallet.js clears it after a few seconds) */
.bzw-msg { position: sticky; bottom: 8px; z-index: 5; align-self: center; justify-self: center; width: fit-content; max-width: min(92%, 420px); margin: 0 auto; padding: 9px 16px;
  border-radius: 999px; text-align: center; font: 600 13px/1.35 var(--bzw-body); color: var(--bzw-txt); border: 1px solid var(--bzw-line);
  background: linear-gradient(180deg, rgba(28,38,52,.96), rgba(12,17,24,.96)); box-shadow: 0 10px 28px rgba(0,0,0,.5); animation: bzwToast .2s ease-out; }
.bzw-msg:empty { display: none; }
@keyframes bzwToast { from { opacity: 0; transform: translateY(8px); } }
.bzw-solo { height: 100%; display: grid; place-content: center; justify-items: center; gap: 16px; }
.bzw-solo .bzw-btn { width: auto; padding: 0 32px; }

/* a page open: the top gets compact */
.bzw.bzw-sub .bzw-top { padding: 8px 12px; }
.bzw.bzw-sub .bzw-bal { font-size: clamp(18px, min(6vw, 11cqi), 30px); }

@media (max-width: 420px) {
  .bzw-top { gap: 10px; padding: 10px 12px; }
  .bzw-grid { gap: 6px; }
  .bzw-act { min-height: 82px; border-radius: 16px; }
  .bzw-l { font-size: 10.5px; }
  .bzw-ic { width: 38px; height: 38px; }
  .bzw-ic .bzw-i { width: 20px; height: 20px; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .bzw { display: grid; grid-template-columns: minmax(200px, 36%) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); align-content: start; gap: 8px 12px; }
  .bzw-top { grid-column: 1; grid-row: 1 / span 3; flex-direction: column; align-items: stretch; justify-content: center; }
  .bzw-top .bzw-sum { flex: none; } /* no tall gas oval: the card centres balance + gas instead of stretching them */
  .bzw-grid, .bzw-page, .bzw > .bzw-msg, .bzw > .bzw-extra { grid-column: 2; }
  .bzw-act { min-height: 62px; padding: 5px 2px; gap: 3px; }
  .bzw-ic { width: 30px; height: 30px; }
  .bzw-ic .bzw-i { width: 17px; height: 17px; }
  .bzw-qr { width: 120px; }
  .bzw-recv { grid-template-columns: auto minmax(0, 1fr); justify-items: stretch; align-items: center; }
  .bzw-recv .bzw-qr { grid-row: span 2; }
  .bzw-btn { min-height: 44px; }
}
@media (min-width: 761px) and (min-height: 521px) {
  .bzw-act { min-height: 108px; }
  .bzw-ic { width: 54px; height: 54px; }
  .bzw-ic .bzw-i { width: 26px; height: 26px; }
  .bzw-l { font-size: 13px; }
}
@keyframes bzwPulse { 50% { transform: scale(1.35); } }
@keyframes bzwIn { from { opacity: 0; transform: translateX(10px); } }
@media (prefers-reduced-motion: reduce) { .bzw-dot, .bzw-page.bzw-in { animation: none !important; } }

/* optional big actions under the balance (adapter.hero, home page only) */
.bzw-hero { display: grid; gap: 8px; }
@media (max-height: 520px) and (orientation: landscape) { .bzw-hero { grid-column: 2; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); } }
