/* ============================================================================
   WellDoneBets — game furniture
   Only what's actually referenced by the game modules. Blackjack (.bjx-*) and
   roulette (.rl-*) ship their own scoped layout inside their JS; this file
   supplies the shared pieces: chips, bet controls, cards, coin, dice, states.
   ========================================================================== */

/* ------------------------------------------------------------- chip rails
   One chip look everywhere: dashed edge, clay face, real press physics. */
.rl-chip, .bjx-chip {
  position: relative;
  font-weight: 700; color: #14110d;
  border: 5px dashed rgba(255,255,255,.92);
  box-shadow: 0 4px 0 rgba(0,0,0,.35), 0 6px 14px rgba(0,0,0,.5);
  transition: transform .12s var(--ease), box-shadow .12s var(--ease);
  user-select: none; touch-action: none;
}
.rl-chip:hover, .bjx-chip:hover { transform: translateY(-4px); box-shadow: 0 7px 0 rgba(0,0,0,.35), 0 12px 22px rgba(0,0,0,.55); }
.rl-chip:active, .bjx-chip:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0,0,0,.35), 0 3px 8px rgba(0,0,0,.5); }

.rl-chip.selected, .bjx-chip.selected {
  transform: translateY(-6px);
  outline: 3px solid var(--ember); outline-offset: 3px;
  box-shadow: 0 8px 0 rgba(0,0,0,.3), 0 0 26px var(--ember-glow);
}

/* placed stacks sit flat on the felt */
.rl-placed, .bjx-betchip {
  color: #14110d; font-weight: 700;
  border: 4px dashed rgba(255,255,255,.9);
  box-shadow: 0 3px 8px rgba(0,0,0,.6);
  touch-action: none;
}

/* the ghost chip that follows a finger/cursor mid-drag */
.wdb-ghost { border: 5px dashed rgba(255,255,255,.95) !important; }

/* drop targets light up */
.rl-spot.drag-over, .bjx-betzone.drag-over {
  outline: 3px dashed var(--ember) !important; outline-offset: -3px;
  background-color: rgba(229,160,13,.16) !important;
}

/* --------------------------------------------------------- bet controls
   Used by slots / coinflip / craps / baccarat via CasinoShared.betPanel */
.wdb-panel { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 18px 0; }

.wdb-stepper {
  display: flex; align-items: center; gap: 6px;
  background: rgba(0,0,0,.34); border: 1px solid rgba(255,255,255,.16);
  border-radius: var(--r-pill); padding: 6px 8px;
  box-shadow: inset 0 2px 8px rgba(0,0,0,.4);
}
.wdb-step {
  width: 42px; height: 42px; border-radius: 50%; border: none;
  background: rgba(255,255,255,.1); color: #fff;
  font-size: 1.4rem; font-weight: 700; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .14s, transform .1s;
}
.wdb-step:hover  { background: rgba(255,255,255,.2); }
.wdb-step:active { transform: scale(.9); }

.wdb-bet {
  width: 130px; text-align: center;
  font-family: var(--money); font-variant-numeric: tabular-nums;
  font-size: 1.35rem; font-weight: 700;
  background: transparent; border: none; outline: none; color: #fff;
}
.wdb-bet:focus { box-shadow: none; background: transparent; }

.wdb-quicks { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.wdb-quick {
  font-family: var(--money); font-size: .82rem; font-weight: 700;
  border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.9); border-radius: var(--r-pill);
  padding: 8px 15px; cursor: pointer;
  transition: all .14s var(--ease);
}
.wdb-quick:hover  { background: rgba(255,255,255,.14); transform: translateY(-1px); }
.wdb-quick:active { transform: translateY(1px); }
.wdb-quick.allin {
  border-color: var(--ember); color: var(--ember);
  background: rgba(229,160,13,.14); letter-spacing: .06em;
}
.wdb-quick.allin:hover { background: rgba(229,160,13,.24); box-shadow: 0 0 16px var(--ember-glow); }

/* --------------------------------------------------------------- results */
.result-msg { font-weight: 700; font-size: 1.1rem; min-height: 28px; margin-top: 14px; }
.result-msg.win  { color: var(--ember); text-shadow: 0 0 18px var(--ember-glow); }
.result-msg.lose { color: var(--sear); }

/* --------------------------------------------------------- coin flip (3D) */
.coin-box { perspective: 1000px; margin: 24px auto 6px; width: 112px; height: 112px; }
.coin {
  width: 100%; height: 100%; position: relative; transform-style: preserve-3d;
  transition: transform 2s cubic-bezier(.18,.9,.3,1.02);
}
.coin .side {
  position: absolute; inset: 0; border-radius: 50%;
  backface-visibility: hidden;
  display: flex; align-items: center; justify-content: center; font-size: 3.1rem;
  background: radial-gradient(circle at 34% 28%, #fde68a, #e5a00d 45%, #92610a 100%);
  border: 5px solid #fef3c7;
  box-shadow: inset 0 0 16px rgba(0,0,0,.35), 0 8px 20px rgba(0,0,0,.55);
}
.coin .tails { transform: rotateY(180deg); }
.coin.flip-heads { transform: rotateY(1800deg); }
.coin.flip-tails { transform: rotateY(1980deg); }

/* ------------------------------------------------------------- card faces */
.bjx-card .front, .bc-card {
  background: linear-gradient(160deg, #ffffff 0%, #eceaf0 100%);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.09);
}

/* ------------------------------------------------------------------ dice */
.cr-die {
  background: linear-gradient(160deg, #ffffff, #dfdce4);
  box-shadow: inset 0 -3px 8px rgba(0,0,0,.18), 0 6px 14px rgba(0,0,0,.5);
}
.cr-pip { box-shadow: inset 0 -1px 2px rgba(255,255,255,.35); }

/* ------------------------------------------------------------- win states */
.winner-glow { animation: goldPulse 1s ease-in-out infinite alternate !important; z-index: 15; }
@keyframes goldPulse {
  from { box-shadow: 0 0 0 2px var(--ember), 0 0 12px var(--ember-glow); }
  to   { box-shadow: 0 0 0 3px var(--ember), 0 0 34px var(--ember); }
}

.win-anim { animation: winFloat 1.4s ease-in-out infinite alternate; }
@keyframes winFloat {
  from { transform: translateY(0);     filter: drop-shadow(0 0 8px var(--ember-glow)); }
  to   { transform: translateY(-12px); filter: drop-shadow(0 16px 22px var(--ember-glow)); }
}

/* --------------------------------------------------------------- loading */
.stage-notice { text-align: center; padding: 40px 20px; color: var(--text-dim); }
.stage-notice h2 { color: var(--text); margin-bottom: 10px; }

/* -------------------------------------------------------- game information */
.game-info {
  width: min(680px, 100%);
  margin: 24px auto 0;
  text-align: left;
  background: rgba(0, 0, 0, .25);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: var(--r-md);
  overflow: hidden;
}

.game-info summary {
  min-height: 50px;
  padding: 14px 17px;
  color: var(--ember);
  cursor: pointer;
  font-weight: 700;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  user-select: none;
}

.game-info summary::-webkit-details-marker {
  display: none;
}

.game-info summary::after {
  content: "+";
  flex: 0 0 auto;
  font-family: var(--money);
  font-size: 1.25rem;
}

.game-info[open] summary::after {
  content: "−";
}

.game-info-body {
  padding: 0 17px 17px;
  color: rgba(255, 255, 255, .84);
  font-size: .92rem;
  line-height: 1.6;
}

.game-info-body p + p {
  margin-top: 12px;
}

.game-info-body ul {
  margin: 10px 0 0 20px;
}

.game-info-body li + li {
  margin-top: 6px;
}

.game-info-table {
  width: 100%;
  margin-top: 12px;
  border-collapse: collapse;
  font-family: var(--money);
  font-size: .82rem;
}

.game-info-table th,
.game-info-table td {
  padding: 9px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  text-align: left;
  vertical-align: top;
}

.game-info-table th {
  color: var(--ember);
}

.game-info-note {
  margin-top: 12px;
  color: var(--text-dim);
  font-size: .84rem;
}