/* ===== Video Poker — game-specific styles =====
   Generic glass chrome comes from shared/css/glass.css (cards reuse .c-card
   wholesale). This file lays out the machine: paytable panel, five card
   wells with HELD tags, betting chips and the deal/draw action row.
   Theme: a crimson slot-machine shell with gold buttons. */

:root {
  --accent-1: #f2b400;
  --accent-2: #f2b400;
  --on-accent: #ffffff;
  --back-1: #3d6bff;
  --back-2: #1c2f8f;
  --bg-1: #8f1626;
  --bg-2: #47060f;
  --bg-glow-a: rgba(200, 40, 60, .5);
  --bg-glow-b: rgba(255, 190, 80, .18);
  --c-text: #f6ece4;
  --c-muted: #d9b3ac;
}

/* Letterbox behind the machine and the frosted Rules modal follow the same
   crimson. Gold primary buttons need a shadow to keep the white label legible. */
body { background: #47060f; }
.c-modal__backdrop { background: rgba(30, 3, 7, .55); }
.c-modal__panel { background: rgba(48, 8, 15, .74); }
.c-btn--primary { text-shadow: 0 1px 2px rgba(0, 0, 0, .45); }

.c-app { --fpad: clamp(12px, 4vw, 36px); }

/* ---------- Machine stack ---------- */
.vpk-board {
  --cw: clamp(58px, 15vw, 92px);
  --ch: calc(var(--cw) * 1.42);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(10px, 2.4vh, 20px);
  max-width: 780px;
  margin: 0 auto;
}
.vpk-main {
  display: flex;
  gap: clamp(14px, 3vw, 26px);
  align-items: stretch;
  justify-content: center;
  width: 100%;
}
.vpk-side {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 2.4vh, 18px);
}

/* ---------- Paytable ---------- */
.vpk-pay {
  width: clamp(170px, 32vw, 220px);
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--glass-line);
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 12px;
  font-weight: 600;
  color: var(--c-muted);
}
.vpk-pay__head {
  font-size: 10.5px;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--glass-line);
  margin-bottom: 3px;
}
.vpk-pay__row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 7px;
  border-radius: 7px;
  transition: background .15s ease, color .15s ease;
}
.vpk-pay__row::after { content: attr(data-pay); font-variant-numeric: tabular-nums; }
.vpk-pay__row.is-win {
  background: linear-gradient(90deg, var(--accent-1), #ffd23e);
  color: #3a2400;
  font-weight: 800;
}

/* ---------- Card wells ---------- */
.vpk-wells { display: flex; gap: clamp(8px, 2.6vw, 16px); }
.vpk-slot {
  position: relative;
  width: var(--cw);
  padding-top: calc(var(--ch) + 24px);
}
/* Empty glass socket until the cards land. */
.vpk-slot::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: var(--cw);
  height: var(--ch);
  border-radius: calc(var(--cw) * .09);
  box-shadow: inset 0 0 0 2px var(--slot-line);
  background: var(--slot);
}
.vpk-slot .c-card {
  position: absolute;
  top: 0; left: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .35), inset 0 0 0 1px var(--card-edge);
  cursor: default;
  transition: transform .14s ease;
}
.vpk-slot .c-card.vpk-new { animation: vpkDeal .28s ease; }
@keyframes vpkDeal {
  from { transform: translateY(-46px) scale(.9); opacity: 0; }
}
/* Selectable during the hold phase; held cards lift with a gold ring. */
.vpk-board--hold .vpk-slot .c-card { cursor: pointer; }
.vpk-slot .c-card.vpk-held {
  transform: translateY(-9px);
  box-shadow: 0 0 0 3px var(--gold), 0 6px 14px rgba(0, 0, 0, .4),
    inset 0 0 0 1px var(--card-edge);
}
.vpk-held-tag {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 223, 107, .55);
  background: rgba(255, 223, 107, .16);
  color: var(--gold);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .12em;
  opacity: 0;
  transition: opacity .14s ease;
  pointer-events: none;
}
.vpk-slot.is-held .vpk-held-tag { opacity: 1; }

/* ---------- Status pill ---------- */
.vpk-mid { min-height: 34px; display: flex; align-items: center; }
.vpk-status {
  padding: 7px 22px;
  border-radius: 999px;
  border: 1px solid var(--glass-line);
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 15px; font-weight: 700; letter-spacing: .01em;
  color: var(--c-text);
  text-align: center;
  transition: color .2s ease, border-color .2s ease;
}
.vpk-status--win  { color: #ffe27a; border-color: rgba(255, 226, 122, .55); }
.vpk-status--lose { color: #ff8b94; border-color: rgba(255, 139, 148, .5); }
.vpk-status--jackpot {
  color: #3a2400;
  background: linear-gradient(90deg, #ffdf6b, #ffb42e);
  border-color: transparent;
  animation: vpkPop .4s ease;
}
@keyframes vpkPop { from { transform: scale(.85); } }

/* ---------- Betting chips (coin look, per the home-icon convention) ---------- */
.vpk-chips { display: flex; gap: 10px; align-items: center; }
.vpk-chip {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 2px dashed rgba(255, 255, 255, .75);
  /* Plain value first: if color-mix() is unsupported the fancy gradient below
     is dropped and the chip still reads as a solid-colour disc. */
  background: var(--chip);
  background:
    repeating-conic-gradient(from 0deg, rgba(255, 255, 255, .22) 0 18deg, transparent 18deg 36deg),
    radial-gradient(circle at 38% 32%, color-mix(in srgb, var(--chip) 78%, #fff), var(--chip) 70%);
  color: #fff;
  font: 800 13px/1 var(--gc-font, system-ui);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .55);
  box-shadow: 0 4px 10px rgba(0, 0, 0, .4), inset 0 0 0 5px rgba(255, 255, 255, .12);
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.vpk-chip:hover:not(:disabled) { transform: translateY(-3px) scale(1.05); }
.vpk-chip:active:not(:disabled) { transform: translateY(0) scale(.97); }
.vpk-chip:focus-visible { outline: none; box-shadow: var(--ring), 0 4px 10px rgba(0, 0, 0, .4); }
.vpk-chip:disabled { opacity: .35; cursor: default; }
.vpk-chip--clear {
  background: var(--glass);
  border-style: solid;
  border-color: var(--glass-line);
  color: var(--c-muted);
  font-size: 20px;
}
.vpk-chip--clear:hover { color: #fff; }

/* ---------- Action row ---------- */
.vpk-actions { display: flex; gap: 10px; justify-content: center; }
.vpk-actions .c-btn { min-width: 110px; text-align: center; font-size: 14px; padding: 9px 16px; }

@media (max-width: 620px) {
  /* Paytable moves above the wells on narrow screens. */
  .vpk-main { flex-direction: column; align-items: center; }
  .vpk-pay { width: min(100%, 320px); }
}
@media (max-width: 430px) {
  .vpk-chip { width: 38px; height: 38px; }
  .vpk-chips { gap: 7px; }
}

@media (prefers-reduced-motion: reduce) {
  .vpk-slot .c-card.vpk-new { animation: none; }
  .vpk-chip:hover:not(:disabled) { transform: none; }
  .vpk-status--jackpot { animation: none; }
}
