/* Buying credits (js/payments.js): Wallet modal tabs, checkout page, player-vs-player notice. */

/* ---------------------------------------------------------------- shared */
.pay-coin { width: 32px; height: 32px; flex-shrink: 0; display: grid; }
.pay-coin svg { width: 100%; height: 100%; }
.pay-coin svg, .pay-coin svg * { stroke: none; }
.pay-loading { display: grid; place-items: center; padding: 56px 0; }
.pay-loading .spinner, .pay-spin { width: 30px; height: 30px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .12); border-top-color: var(--green); animation: gl-spin .8s linear infinite; }
.pay-pill { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; white-space: nowrap; }
.pay-pill.wait { background: rgba(61, 123, 255, .18); color: #8fb3ff; }
.pay-pill.seen, .pay-pill.part { background: rgba(255, 181, 71, .16); color: #ffc46b; }
.pay-pill.ok { background: rgba(47, 216, 107, .15); color: var(--green); }
.pay-pill.off { background: var(--panel-3); color: var(--muted); }
.pay-bonus { position: absolute; top: 8px; right: 8px; padding: 3px 7px; border-radius: 5px; background: var(--gold); color: #2a1c00; font-size: 11px; font-weight: 900; line-height: 1.2; }
.pay-bonus.inline { position: static; display: inline-block; margin-left: 10px; vertical-align: 2px; }

/* ---------------------------------------------------------------- Wallet modal */
.modal-wset.modal-buy { max-width: 720px; }
.wtabs { margin: 0 0 24px; }
.wtabs button { flex: 1; }
.pay-note, .pay-pvp { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 10px; line-height: 1.5; font-size: 14px; }
.pay-note { background: rgba(61, 123, 255, .1); color: #b7cdfd; margin-bottom: 24px; }
.pay-note b { color: #fff; font-weight: 700; }
.pay-note svg { color: #8fb3ff; margin-top: 1px; }
.pay-pvp { background: rgba(255, 150, 70, .1); color: #f5b07c; margin-top: 20px; font-size: 13.5px; }
.pay-pvp svg { color: #f5a66b; margin-top: 1px; }
.pay-label { color: var(--muted); font-weight: 600; margin: 0 0 12px; }
.pay-packs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 24px; }
.pay-pack {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 30px 6px 0; min-height: 132px; overflow: hidden;
  background: var(--panel-2); border: 2px solid transparent; border-radius: 12px; transition: border-color .15s, background .15s;
}
.pay-pack:hover { background: var(--panel-3); }
.pay-pack.active { border-color: var(--green); background: color-mix(in srgb, var(--green) 9%, var(--p2)); }
.pay-pack b { font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.pay-pack small { color: var(--muted); font-size: 12px; font-weight: 600; }
.pay-price { margin-top: auto; align-self: stretch; padding: 9px 0; background: rgba(0, 0, 0, .2); font-weight: 800; font-size: 15px; }
.pay-pack.active .pay-price { background: var(--green); color: var(--green-ink); }
.pay-coins { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 20px; }
.pay-coinopt {
  display: flex; align-items: center; gap: 10px; padding: 12px; min-width: 0; text-align: left;
  background: var(--panel-2); border: 2px solid transparent; border-radius: 10px; transition: border-color .15s, background .15s;
}
.pay-coinopt:hover:not(:disabled) { background: var(--panel-3); }
.pay-coinopt.active { border-color: var(--green); }
.pay-coinopt:disabled { opacity: .45; cursor: not-allowed; }
.pay-coinopt > span:last-child { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.pay-coinopt b { font-size: 14px; }
.pay-coinopt small { color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pay-sum { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border-radius: 10px; background: var(--bg-deep); color: var(--muted); }
.pay-sum b { color: var(--text); }
.pay-ack { margin: 20px 0; align-items: flex-start; line-height: 1.5; font-weight: 500; }
.pay-ack input { margin: 2px 0 0; flex-shrink: 0; }
.pay-fine { text-align: center; margin: 14px 0 0; }
.pay-list { display: flex; flex-direction: column; gap: 8px; }
.pay-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 10px; background: var(--panel-2); transition: background .15s; }
.pay-row:hover { background: var(--panel-3); }
.pay-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pay-row-main b { white-space: nowrap; }
.pay-row-main small, .pay-row-side small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pay-row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.pay-empty { text-align: center; padding: 28px 0 8px; }
.pay-empty p { margin: 0 0 18px; }

/* ---------------------------------------------------------------- checkout page */
.pay-head { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; flex-wrap: wrap; }
.pay-head h1 { font-size: 24px; margin: 0; }
.pay-back { padding-left: 8px; }
.pay-grid { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 22px; align-items: start; }
.pay-grid.done { grid-template-columns: minmax(0, 720px); }
.pay-qrcard { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.pay-qr { width: 100%; max-width: 288px; padding: 10px; background: #fff; border-radius: 14px; line-height: 0; }
.pay-qr svg { width: 100%; height: auto; display: block; }
.pay-qr svg, .pay-qr svg * { stroke: none; } /* the site-wide svg rule strokes icons */
.pay-timer { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.pay-timer span { color: var(--muted); font-weight: 600; font-size: 13px; }
.pay-timer b { font-size: 36px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.pay-timer.low b { color: #ffb547; }
.pay-info { margin: 0; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.pay-pack-line { display: flex; align-items: center; gap: 14px; }
.pay-pack-line .pay-coin { width: 46px; height: 46px; }
.pay-pack-line b { font-size: 20px; }
.pay-pack-line small { display: block; color: var(--muted); margin-top: 4px; font-size: 13px; }
.pay-state { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: 12px; }
.pay-state > div { min-width: 0; flex: 1; }
.pay-state b { display: block; font-size: 15px; margin-bottom: 4px; }
.pay-state span { color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.pay-state > svg { width: 22px; height: 22px; margin-top: 1px; }
.pay-state.wait, .pay-state.seen { background: rgba(61, 123, 255, .1); }
.pay-state.ok { background: rgba(47, 216, 107, .12); }
.pay-state.ok > svg { color: var(--green); stroke-width: 3; }
.pay-state.part { background: rgba(255, 181, 71, .1); }
.pay-state.part > svg { color: #ffb547; }
.pay-state.off { background: var(--panel-2); }
.pay-state.off > svg { color: var(--muted); }
.pay-state .pay-spin { width: 20px; height: 20px; border-width: 2.5px; border-top-color: #8fb3ff; flex-shrink: 0; margin-top: 1px; }
.pay-dot { width: 12px; height: 12px; margin: 5px 4px 0; border-radius: 50%; background: #5f97ff; flex-shrink: 0; box-shadow: 0 0 0 0 rgba(95, 151, 255, .6); animation: pay-ping 1.6s infinite; }
@keyframes pay-ping { 70% { box-shadow: 0 0 0 9px rgba(95, 151, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(95, 151, 255, 0); } }
.pay-prog { margin-top: 12px; height: 8px; }
.pay-field { display: flex; flex-direction: column; gap: 8px; }
.pay-flabel { color: var(--muted); font-weight: 600; font-size: 13px; }
.pay-copy { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 8px 8px 8px 16px; border-radius: 10px; background: var(--bg-deep); border: 1px solid var(--line); }
.pay-copy .mono { flex: 1; min-width: 0; font-size: 15px; line-height: 1.4; }
.pay-amount b { font-size: 19px; }
.pay-copy .btn { flex-shrink: 0; }
.pay-copy .btn svg { width: 15px; height: 15px; }
.pay-field > small { line-height: 1.45; }
.pay-warn { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.5; color: var(--muted); }
.pay-warn b { color: var(--text); }
.pay-warn svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; color: #ffb547; }
.pay-warn.rules svg { color: #8fb3ff; }
.pay-warn .mono { font-size: 12px; }
.pay-txs { display: flex; flex-direction: column; }
.pay-txs .pay-flabel { margin-bottom: 6px; }
.pay-tx { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); font-size: 13px; }
.pay-tx a { color: #8fb3ff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pay-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.pay-actions:empty { display: none; }
.pay-missing { text-align: center; padding: 40px; }
.pay-missing h3 { margin: 0 0 8px; }
.pay-missing p { margin: 0 0 20px; }
.modal-paycancel { max-width: 460px; }
.pay-confirm p { margin: 0 0 14px; line-height: 1.55; }
.pay-confirm-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }

/* ---------------------------------------------------------------- player-vs-player notice */
.pvp-block { display: flex; gap: 14px; align-items: flex-start; padding: 16px 20px; margin-bottom: 22px; border-radius: 12px; background: rgba(255, 150, 70, .1); border: 1px solid rgba(255, 150, 70, .25); }
.pvp-block > svg { width: 22px; height: 22px; color: #f5a66b; margin-top: 1px; }
.pvp-block b { display: block; margin-bottom: 4px; font-size: 15px; }
.pvp-block span { color: var(--muted); line-height: 1.5; font-size: 13.5px; }

/* ---------------------------------------------------------------- phones */
@media (max-width: 860px) {
  .pay-grid { grid-template-columns: minmax(0, 1fr); }
  .pay-qrcard { padding: 22px; }
}
@media (max-width: 600px) {
  .pay-packs, .pay-coins { grid-template-columns: repeat(3, 1fr); }
  .pay-pack { min-height: 120px; }
  .pay-pack b { font-size: 19px; }
  .wtabs { width: 100%; }
  .wtabs button { padding: 0 8px; font-size: 13px; }
  .pay-coinopt { flex-direction: column; justify-content: center; gap: 6px; padding: 12px 6px; text-align: center; }
  .pay-coinopt > span:last-child { align-items: center; }
  .pay-coinopt .pay-coin { width: 28px; height: 28px; }
  .pay-back span { display: none; }
  .pay-head { gap: 10px; }
  .pay-copy .mono { font-size: 14px; }
  .pay-head h1 { font-size: 22px; }
  .pay-tx { grid-template-columns: minmax(0, 1fr) auto; }
  .pay-row { gap: 12px; padding: 14px; }
  .pay-row-main small { white-space: normal; overflow-wrap: anywhere; }
  .pay-tx > span:nth-child(2) { display: none; }
}

/* Header balance menu: "Buy credits" sits above "Wallet Settings". */
.bal-buy { margin-bottom: 8px; }

/* ---------------------------------------------------------------- Buy tab: compact, aligned
   One 16px rhythm between blocks; pack cards are short, the price bar runs edge to edge inside the
   card's rounded corners. */
.modal-buy .pay-note { margin-bottom: 16px; padding: 12px 14px; font-size: 13.5px; }
.modal-buy .pay-label { margin: 0 0 8px; font-size: 13px; }
.modal-buy .pay-packs { gap: 8px; margin-bottom: 16px; }
.modal-buy .pay-pack { padding: 22px 0 0; min-height: 0; gap: 0; border-radius: 12px; }
.modal-buy .pay-pack b { font-size: 20px; line-height: 1.15; }
.modal-buy .pay-pack small { font-size: 11.5px; margin-bottom: 12px; }
.modal-buy .pay-price { margin: auto 0 0; padding: 8px 0; font-size: 14px; border-radius: 0; }
.modal-buy .pay-bonus { top: 6px; right: 6px; padding: 2px 6px; font-size: 10.5px; border-radius: 4px; }
.modal-buy .pay-coins { gap: 8px; margin-bottom: 16px; }
.modal-buy .pay-coinopt { padding: 10px; gap: 8px; }
.modal-buy .pay-coinopt .pay-coin { width: 28px; height: 28px; }
.modal-buy .pay-sum { padding: 12px 14px; }
.modal-buy .pay-pvp { margin-top: 16px; padding: 12px 14px; font-size: 13px; }
.modal-buy .pay-ack { margin: 16px 0; font-size: 13.5px; }
@media (max-width: 600px) {
  .modal-buy .pay-pack b { font-size: 18px; }
}
/* Custom amount row (under the packs): label, $ input, credits it buys. */
.pay-custom { display: flex; align-items: center; gap: 14px; padding: 10px 12px; margin: -8px 0 16px; border-radius: 12px; background: var(--panel-2); border: 2px solid transparent; cursor: text; transition: border-color .15s, background .15s; }
.pay-custom:hover { background: var(--panel-3); }
.pay-custom.active { border-color: var(--green); background: color-mix(in srgb, var(--green) 9%, var(--p2)); }
.pay-custom-lbl { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.pay-custom-lbl b { font-size: 14px; }
.pay-custom-lbl small { color: var(--muted); font-size: 11.5px; }
.pay-custom-in { display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border-radius: 8px; background: var(--bg-deep); border: 1px solid var(--line); font-weight: 800; }
.pay-custom-in input { width: 84px; background: none; border: 0; outline: none; color: var(--text); font: inherit; font-size: 16px; padding: 0; }
.pay-custom-get { min-width: 112px; text-align: right; font-weight: 800; white-space: nowrap; }
.pay-sum[hidden] { display: none; }
@media (max-width: 600px) {
  .pay-custom { flex-wrap: wrap; gap: 10px; }
  .pay-custom-lbl { flex-basis: 100%; }
  .pay-custom-in { flex: 1; }
  .pay-custom-in input { width: 100%; }
}
