/* SharpLab HQ — Baccarat (Punto Banco) page.
   Builds on hqstyle.css (shared vars/header/nav/.btn/.card). Only page-specific styling here.
   Uses ONLY hqstyle.css custom properties for color/spacing/radius. */

/* ── Page intro ── */
.bac-head { margin: 4px 0 20px; text-align: center; }
.bac-head h1 { font-size: 26px; margin: 0 0 4px; }
.bac-head p { color: var(--muted); margin: 0; font-size: 14px; }

.balancechip {
  display: inline-flex; align-items: center; gap: 6px; margin-left: 10px;
  font-size: 13px; font-weight: 700; color: var(--gold);
  background: var(--panel2); border: 1px solid var(--line);
  border-radius: var(--r-pill); padding: 3px 11px; vertical-align: middle;
}

/* ── Table layout ── */
.bac-wrap { max-width: 560px; margin: 0 auto; }
.bcard { display: flex; flex-direction: column; gap: var(--s-4); }

.bhead { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.bhead h2 { margin: 0; font-size: 15px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); }
.bhead .gicon { font-size: 20px; }
.bhead .gpay { font-size: 11px; color: var(--muted); }
.bhead .gpay b { color: var(--fg); }

/* ── Felt (both hands) ── */
.felt {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3);
  background: radial-gradient(circle at 50% 30%, var(--green-soft), transparent 70%);
  border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-4);
}
.hand {
  display: flex; flex-direction: column; gap: var(--s-2); align-items: center;
  border: 1px solid transparent; border-radius: var(--r); padding: var(--s-3) var(--s-2);
  transition: border-color var(--t), background var(--t);
}
.hand.win { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 12%, transparent); }
.handlbl { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); font-weight: 700; }
.hand.win .handlbl { color: var(--gold); }
.handtotal { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--fg); }
.handcards { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; min-height: 62px; }

/* ── Card faces ── */
.pcardface {
  width: 42px; height: 60px; border-radius: var(--r-sm);
  background: #f4f6ff; color: #11121a; border: 1px solid #d0d5e8;
  display: grid; place-items: center; font-size: 17px; font-weight: 800;
  box-shadow: var(--shadow-sm); font-variant-numeric: tabular-nums;
  animation: bac-deal .22s ease both;
}
.pcardface.red { color: #d13040; }
@keyframes bac-deal { from { opacity: 0; transform: translateY(-8px) scale(.9); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .pcardface { animation: none; }
}

/* ── Side selection buttons ── */
.sidegroup { display: flex; flex-direction: column; gap: 6px; }
.sidelbl { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.sidebtns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sidebtn {
  font-family: inherit; cursor: pointer; text-align: center;
  color: var(--fg); background: var(--panel2); border: 1px solid var(--line);
  border-radius: var(--r); padding: 10px 8px;
  transition: border-color var(--t), background var(--t), transform var(--t);
}
.sidebtn:hover { border-color: var(--accent); transform: translateY(-1px); }
.sidebtn.on { border-color: var(--accent); background: var(--accent-soft); }
.sidebtn .sn { display: block; font-size: 14px; font-weight: 800; }
.sidebtn .sp { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.sidebtn.on .sp { color: var(--accent2); }

/* ── Bet input (copied from casino.css) ── */
.betrow { display: flex; flex-direction: column; gap: 6px; }
.betrow .betlbl { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.betline { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.betinput {
  font-family: inherit; font-size: 15px; font-weight: 700; color: var(--fg);
  background: var(--panel2); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 8px 10px; width: 120px; font-variant-numeric: tabular-nums;
}
.betinput:focus { outline: none; border-color: var(--accent); }
.chipbtns { display: inline-flex; gap: 5px; flex-wrap: wrap; }
.chipbtn {
  font-family: inherit; font-size: 12px; font-weight: 700; cursor: pointer;
  color: var(--muted); background: var(--panel2); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 7px 10px; transition: border-color var(--t), color var(--t);
}
.chipbtn:hover { border-color: var(--accent); color: var(--fg); }

/* ── Play button + result ── */
.playbtn { align-self: flex-start; }
.result { font-size: 14px; min-height: 20px; font-weight: 700; }
.result.win { color: var(--green); }
.result.loss { color: var(--red); }
.result.push { color: var(--gold); }
.result.idle { color: var(--muted); font-weight: 400; }

/* ═══════════════════════════════════════════════════════════════════════════
   Copied verbatim from cards.css / pokemon.css so the coins hub + toasts are
   styled on this page too.
   ═══════════════════════════════════════════════════════════════════════════ */
.coinschip { font-weight: 700; color: var(--gold); background: var(--panel2); border: 1px solid var(--line); border-radius: 999px; padding: 3px 11px; font-size: 13px; white-space: nowrap; cursor: pointer; transition: border-color .15s, transform .15s; }
.coinschip:hover { border-color: var(--gold); transform: translateY(-1px); }

/* Coins hub modal */
.hubov { position: fixed; inset: 0; z-index: 250; display: grid; place-items: center; padding: 20px; background: rgba(5,7,11,.6); backdrop-filter: blur(3px); animation: cd-scrim-in .18s ease both; }
@keyframes cd-scrim-in { from { opacity: 0; } to { opacity: 1; } }
.hubcard { width: min(460px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px 20px; box-shadow: 0 24px 60px -20px #000; }
.hubhead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.hubhead h3 { margin: 0; font-size: 17px; }
.hubx { background: none; border: 0; color: var(--muted); font-size: 18px; cursor: pointer; line-height: 1; padding: 4px 8px; border-radius: 8px; }
.hubx:hover { color: var(--fg); background: var(--panel2); }
.hubrow { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); }
.hubrow:first-of-type { border-top: 0; }
.hubicon { font-size: 20px; width: 30px; text-align: center; flex: 0 0 auto; }
.hubt { font-weight: 700; font-size: 14px; }
.hubd { color: var(--muted); font-size: 12.5px; line-height: 1.45; margin-top: 2px; }
.hubfoot { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; text-align: right; }
.hubfoot b { color: var(--gold); }

.cardtoast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 300;
  background: var(--panel2); color: var(--fg); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 18px; font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.5);
}
