/* Wager: the chip shop (#/shop). Owner: SITE. Theme tokens only (styles.css :root): no colours of its own.
   The packs are passes (.ticket: black glass, a gold hairline, cut corners). Phone first: one pack per row with the
   chip amount on the left and the price on the right; from 620px the three packs stand side by side. */
.shop-head { text-align: center; padding: 8px 0 2px; }
.shop-head h1 {
  font-weight: 900; font-size: clamp(36px, 11vw, 56px); line-height: 1; letter-spacing: .05em; margin: 0; color: var(--gold-2);
  background: linear-gradient(180deg, var(--gold-3) 10%, var(--gold-2) 46%, var(--gold) 72%, var(--gold-deep)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.shop-sub { margin: 10px auto 0; max-width: 32ch; font-size: 16px; font-weight: 600; color: var(--text); text-wrap: balance; }
.shop-sample { margin: 14px 0 0; }
.shop-slot:empty { display: none; }
.shop-slot { margin: 0 0 14px; }

/* ---- the packs ---- */
.shop-packs { display: grid; gap: 12px; margin: 16px 0 14px; }
.shop-pack {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name name" "chips price" "chips per" "line line" "buy buy";
  gap: 0 12px; align-items: end; padding: 24px 16px 16px;
}
.shop-pack p { margin: 0; }
.shop-pack.best { border-color: var(--gold-2); --glass: linear-gradient(180deg, color-mix(in srgb, var(--gold) 22%, transparent), color-mix(in srgb, var(--gold) 4%, transparent) 62%), var(--panel); }
.shop-pack-name { grid-area: name; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-weight: 700; font-size: 14px; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); padding-right: 64px; min-height: 24px; }
.shop-best { letter-spacing: .08em; }
.shop-pack-chips { grid-area: chips; align-self: center; display: flex; flex-direction: column; align-items: flex-start; gap: 0; min-width: 0; }
.shop-pack-chips b {
  font-family: var(--font-display); font-weight: 900; font-size: clamp(46px, 14.5vw, 62px); line-height: 1.05; letter-spacing: .02em; color: var(--gold-2);
  background: linear-gradient(180deg, var(--gold-3) 12%, var(--gold-2) 48%, var(--gold) 76%, var(--gold-deep)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.shop-pack-chips span { font-weight: 700; font-size: 15px; letter-spacing: .16em; text-transform: uppercase; color: var(--ice); }
.shop-pack-price { grid-area: price; text-align: right; font-size: 22px; line-height: 1.2; color: var(--text); white-space: nowrap; }
.shop-pack-per { grid-area: per; text-align: right; font-family: var(--font-mono); font-size: 12px; color: var(--mute); white-space: nowrap; }
.shop-pack-line { grid-area: line; margin-top: 8px; color: var(--text); }
.shop-buy { grid-area: buy; margin-top: 14px; min-height: 52px; font-size: 19px; }
.shop-odds { margin: 0 0 4px; text-align: center; font-weight: 600; color: var(--ice); }

/* ---- the rules: readable type, one line each ---- */
.shop-rules ul { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); background: var(--panel); }
.shop-rules li { position: relative; padding: 13px 14px 13px 38px; font-size: 16px; line-height: 1.4; font-weight: 600; color: var(--text); border-bottom: 1px solid var(--line-soft); }
.shop-rules li:last-child { border-bottom: 0; }
.shop-rules li::before { content: ""; position: absolute; left: 15px; top: 20px; width: 9px; height: 9px; border-radius: 50%; background: var(--gold-2); }
.shop-totals { color: var(--gold-3); }

/* ---- the buy flow panel and the order dialog ---- */
.shop-flow { padding: 24px 16px 16px; text-align: center; }
.shop-flow p { margin: 0 0 10px; font-size: 16px; }
.shop-flow.tone-ok { border-color: var(--gold-2); --glass: radial-gradient(110% 120% at 50% 0%, color-mix(in srgb, var(--gold-2) 30%, transparent), transparent 64%), var(--panel); }
.shop-flow.tone-warn { border-color: var(--lose); }
.shop-flow.tone-warn h2 { color: var(--text); }
.shop-flow details { margin-top: 14px; text-align: left; }
.shop-flow summary { cursor: pointer; font-weight: 600; color: var(--gold-2); }
.shop-flow details > * + * { margin-top: 8px; }
.shop-big, .shop-order-price {
  font-family: var(--font-display); font-weight: 900; line-height: 1.05; letter-spacing: .03em; color: var(--gold-3);
}
.shop-flow .shop-big { font-size: clamp(40px, 13vw, 64px); margin: 0 0 6px; }
.shop-balance { color: var(--win); }
.shop-sig { text-align: left; font-size: 13px; margin: 0 0 10px; -webkit-user-select: all; user-select: all; }
.shop-sig-short { color: var(--gold-3); overflow-wrap: anywhere; }
.shop-actions { justify-content: center; margin-top: 12px; }
.shop-actions .btn { flex: 1 1 130px; }
.shop-actions .btn.primary { font-size: 15px; letter-spacing: .05em; white-space: nowrap; }
.shop-wait { height: 4px; margin: 12px 0 2px; background: var(--panel-3); overflow: hidden; position: relative; }
.shop-wait::before { content: ""; position: absolute; inset: 0; width: 40%; background: linear-gradient(90deg, transparent, var(--gold-2), transparent); animation: shop-wait 1.4s linear infinite; }
@keyframes shop-wait { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
.shop-order { text-align: center; margin-bottom: 18px; }
.shop-order p { margin: 0; }
.shop-order-pack { font-weight: 700; font-size: 18px; letter-spacing: .06em; text-transform: uppercase; color: var(--ice); }
.shop-order .shop-order-price { font-size: clamp(34px, 11vw, 46px); }

/* ---- "+ Get chips": next to the balance in the top bar, and under the stake picker in the lobby ---- */
.chip-pill.get-chips { border-color: var(--gold); color: var(--gold-ink); background: linear-gradient(180deg, var(--gold-2), var(--gold)); }
.get-chips-line { margin: 10px 0 0; text-align: right; font-size: 15px; font-weight: 700; }
a.get-chips { white-space: nowrap; }

@media (min-width: 620px) {
  .shop-packs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shop-packs:has(.shop-pack:nth-child(3):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); } /* exactly three: one row */
  .shop-pack { grid-template-columns: minmax(0, 1fr); grid-template-areas: "name" "chips" "price" "per" "line" "buy"; grid-template-rows: auto 1fr auto auto auto auto; text-align: center; padding: 28px 14px 16px; }
  .shop-pack-name { justify-content: center; padding: 0; min-height: 50px; align-content: start; }
  .shop-pack-chips { flex-direction: column; align-items: center; margin: 4px 0 10px; }
  .shop-pack-chips b { font-size: 50px; }
  .shop-pack-price, .shop-pack-per { text-align: center; }
  .shop-sub { max-width: none; }
}
@media (prefers-reduced-motion: reduce) { .shop-wait::before { animation: none; width: 100%; } }
