/* buy-caps.css — the caps top-up surface (bundle ladder + GCash/crypto payment modal).
   Lifted verbatim out of shop.css so the dialog styling travels with buy-caps.mjs: /perks
   loads a different stylesheet and would otherwise render the modal unstyled.

   Loaded by /shop AND /perks. shop.css's kit-details modal reuses the shared .sk-dlg /
   .sk-body / .sk-header / .sk-btn chrome defined here, so /shop must load both files. */

/* ===== Buy-caps ladder dialog (shares .sk-dlg chrome with the payment modal) ===== */
.sk-context {
  background: var(--panel-inset); border: 1px solid var(--border-bright);
  border-radius: 9px; padding: 0.7rem 0.9rem; margin: 0 0 0.9rem;
  color: var(--text); font-size: 0.86rem; line-height: 1.5;
}
.sk-context-plain { color: var(--muted); }
.sk-bundles { display: flex; flex-direction: column; gap: 0.5rem; }
.sk-bundle {
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: "caps price" "rate price";
  align-items: center; gap: 0.1rem 0.75rem;
  width: 100%; text-align: left; cursor: pointer;
  background: var(--panel-inset); border: 1px solid var(--border); border-radius: 10px;
  padding: 0.7rem 0.9rem; font: inherit;
  transition: border-color 0.15s, background 0.15s;
}
.sk-bundle:hover { border-color: var(--shop-accent); }
.sk-bundle-pick { border-color: var(--shop-accent); background: var(--shop-accent-soft); }
.sk-bundle-caps {
  grid-area: caps; color: var(--shop-caps); font-size: 1rem; font-weight: 700;
  font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 0.5rem;
}
.sk-bundle-rate { grid-area: rate; color: var(--muted); font-size: 0.74rem; }
.sk-bundle-price {
  grid-area: price; color: var(--text); font-size: 1rem; font-weight: 700;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.sk-tag {
  font-size: 0.6rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  border-radius: 999px; padding: 0.12rem 0.5rem;
}
.sk-tag-best { color: #6ee7a8; border: 1px solid rgba(63,185,80,0.5); background: rgba(63,185,80,0.12); }
.sk-tag-pick { color: var(--shop-accent); border: 1px solid var(--shop-accent); background: var(--shop-accent-soft); }
/* VIP add-on row under the bundle ladder. Reads as a choice attached to the purchase, not as
   another product: same inset panel language as the bundles, but full width and unclickable
   except for the box itself. */
.sk-vip {
  display: flex; align-items: flex-start; gap: 0.6rem;
  margin: 0.75rem 0 0; padding: 0.7rem 0.85rem;
  background: var(--panel-inset, rgba(255,255,255,0.04));
  border: 1px solid var(--border); border-radius: 8px;
  cursor: pointer;
}
.sk-vip:hover { border-color: rgba(240,122,184,0.55); }
.sk-vip input { margin: 0.15rem 0 0; flex: 0 0 auto; accent-color: #f07ab8; width: 1rem; height: 1rem; }
.sk-vip-text { font-size: 0.8rem; line-height: 1.45; color: var(--text, #e6e6e6); }
.sk-vip-text strong { color: #f07ab8; font-weight: 600; }

.sk-fineprint { color: var(--muted); font-size: 0.76rem; line-height: 1.5; margin: 0.9rem 0 0; }

/* ===== Payment modal (.sk-* shared with the caps dialog) ===== */
/* Dialogs render in the top layer as siblings of <main.shop>, so they don't inherit its
   --shop-accent / --shop-caps. Re-declare them here (server-scoped via the <html> data-server)
   or every accent inside a dialog silently resolves to empty and buttons render un-styled. */
.sk-dlg {
  --shop-accent: var(--sky);
  --shop-accent-soft: color-mix(in srgb, var(--shop-accent) 12%, transparent);
  --shop-caps: #ffcc4d;
  background: var(--panel); color: var(--text);
  border: 1px solid var(--border); border-radius: 14px;
  padding: 0; max-width: 440px; width: 92%;
}
[data-server="heat"] .sk-dlg { --shop-accent: #f0b154; }
.sk-dlg::backdrop { background: rgba(0,0,0,0.55); }
.sk-body { padding: 1.5rem 1.5rem 1.25rem; }

.sk-header {
  display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem;
  margin: 0 0 0.9rem;
}
.sk-headline {
  margin: 0; font-size: 1.05rem; font-weight: 700; color: var(--shop-accent);
  flex: 1; min-width: 0; word-break: break-word;
}
.sk-expires { color: var(--muted); font-size: 0.8rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sk-expires strong { color: var(--text); font-weight: 600; }

.sk-loading { color: var(--muted); text-align: center; font-size: 0.9rem; padding: 2.5rem 0; }

.sk-qr { background: #fff; padding: 0.6rem; border-radius: 10px; margin: 0 auto 0.6rem; max-width: 220px; line-height: 0; }
.sk-qr svg { width: 100%; height: auto; display: block; }
.sk-scan-hint { text-align: center; color: var(--muted); font-size: 0.8rem; margin: 0 0 0.7rem; }

.sk-meta-row {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.45rem 0.75rem; border-radius: 8px;
  background: var(--panel-inset); border: 1px solid var(--border);
  margin: 0.3rem 0; font-size: 0.9rem;
}
.sk-meta-row .lbl { color: var(--muted); font-size: 0.78rem; }
.sk-meta-row .val { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.sk-amount-val { color: var(--shop-accent); font-size: 1rem; }

.sk-wait-hint { text-align: center; color: var(--muted); font-size: 0.82rem; line-height: 1.45; margin: 0.6rem 0 0.4rem; }
.sk-result { min-height: 1.2em; margin: 0.4rem 0 0.9rem; color: var(--muted); font-size: 0.9rem; }

/* Foreign-payer (Wise / AlipayHK) fold-out inside the pay modal */
.sk-intl { margin: 0.7rem 0 0.2rem; border-top: 1px solid var(--border); padding-top: 0.55rem; }
.sk-intl > summary { cursor: pointer; color: var(--muted); font-size: 0.82rem; user-select: none; }
.sk-intl[open] > summary { color: var(--text); }
.sk-intl-steps { margin: 0.5rem 0 0.3rem; padding-left: 1.2rem; color: var(--text); font-size: 0.84rem; line-height: 1.5; }
.sk-intl-steps li { margin-bottom: 0.45rem; }
.sk-intl-num { font-variant-numeric: tabular-nums; }
.sk-intl-fine { color: var(--muted); font-size: 0.78rem; line-height: 1.45; }
.sk-copy {
  margin-left: 0.35rem; padding: 0.1rem 0.5rem; font-size: 0.72rem; border-radius: 6px;
  border: 1px solid var(--border); background: transparent; color: var(--muted);
  cursor: pointer; font-family: inherit;
}
.sk-copy:hover { color: var(--text); border-color: var(--muted); }

/* Payment-confirmed state. */
#skPay.sk-paid .sk-qr,
#skPay.sk-paid .sk-scan-hint,
#skPay.sk-paid .sk-meta-row,
#skPay.sk-paid .sk-intl,
#skPay.sk-paid .sk-wait-hint { display: none; }
#skPay.sk-paid .sk-result {
  display: flex; flex-direction: column; align-items: center; gap: 0.35rem;
  text-align: center; margin: 1.5rem 0 1.25rem;
}
/* Crypto rail: rail chooser + pay view. Mirrors the GCash sk-paid collapse. */
.sk-rail-lead { color: var(--text); font-size: 0.9rem; margin: 0.2rem 0 0.6rem; }
.sk-rail-btns { display: flex; flex-direction: column; gap: 0.5rem; }
.sk-rail-btn {
  display: flex; flex-direction: column; align-items: flex-start; gap: 0.1rem;
  padding: 0.6rem 0.8rem; border: 1px solid var(--border); border-radius: 8px;
  background: transparent; color: var(--text); cursor: pointer; text-align: left; font: inherit;
}
.sk-rail-btn:hover { border-color: var(--accent); }
.sk-rail-btn strong { font-size: 0.95rem; }
.sk-rail-btn span { color: var(--muted); font-size: 0.78rem; }
.sk-crypto-addr { font-family: ui-monospace, monospace; font-size: 0.78rem; word-break: break-all; }
.sk-rail-crypto-lead { margin-top: 0.8rem; }
.sk-rail-assets { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.sk-rail-assets .sk-rail-btn { width: 100%; }
#skCrypto.sk-paid .sk-qr,
#skCrypto.sk-paid .sk-scan-hint,
#skCrypto.sk-paid .sk-meta-row,
#skCrypto.sk-paid .sk-intl-fine,
#skCrypto.sk-paid .sk-wait-hint { display: none; }
#skCrypto.sk-paid .sk-result {
  display: flex; flex-direction: column; align-items: center; gap: 0.35rem;
  text-align: center; padding: 0.8rem 0 0.4rem;
}

.sk-paid-badge { display: inline-flex; align-items: center; gap: 0.4rem; color: #34d399; font-weight: 700; font-size: 1.05rem; }
.sk-paid-badge svg { width: 1rem; height: 1rem; flex: none; }
.sk-paid-detail { color: var(--muted); font-size: 0.85rem; line-height: 1.45; max-width: 30ch; }

.sk-actions { display: flex; gap: 0.6rem; justify-content: flex-end; }
.sk-actions[hidden] { display: none; }
.sk-btn { padding: 0.5rem 1rem; border-radius: 8px; font-weight: 600; cursor: pointer; font-size: 0.92rem; font-family: inherit; }
.sk-btn-secondary { background: var(--panel-inset); border: 1px solid var(--border); color: var(--text); }

