/* ============ Velo Poker on the painted plate (design/v2/poker.webp) ============
   Sizes use var(--u) = one plate pixel, so everything scales with the painting. */

/* Pieces of the plate reused on top (your portrait over your cards, the slider knob, the preset boxes) */
.game-poker .pk-copy {
  background-image: url("../../img/v2/plates/poker.webp");
  background-repeat: no-repeat;
  background-size: calc(941 * var(--u)) calc(1672 * var(--u));
}
.game-poker .pk-portrait { border-radius: 50%; z-index: 4; pointer-events: none; }

/* Stacks under the names and the pot amount */
.game-poker .pk-stack,
.game-poker .pk-pot {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
  font-weight: 500;
  line-height: 1;
  color: #F5E3A8;
  text-shadow: 0 calc(2 * var(--u)) calc(3 * var(--u)) rgba(0, 0, 0, 0.8);
  pointer-events: none;
  z-index: 5;
}
.game-poker .pk-stack { font-size: calc(28 * var(--u)); }
.game-poker .pk-stack.you { font-size: calc(33 * var(--u)); }
.game-poker .pk-pot { font-size: calc(33 * var(--u)); font-weight: 700; }

/* Active player: the portrait ring glows */
.game-poker .pk-glow { border-radius: 50%; pointer-events: none; z-index: 5; opacity: 0; transition: opacity 0.25s; }
.game-poker .pk-glow.on {
  opacity: 1;
  box-shadow: 0 0 calc(18 * var(--u)) calc(6 * var(--u)) rgba(255, 214, 102, 0.85), inset 0 0 calc(10 * var(--u)) calc(3 * var(--u)) rgba(255, 220, 120, 0.7);
  animation: pk-pulse 0.9s ease-in-out infinite alternate;
}
@keyframes pk-pulse { to { box-shadow: 0 0 calc(30 * var(--u)) calc(10 * var(--u)) rgba(255, 214, 102, 0.95), inset 0 0 calc(14 * var(--u)) calc(4 * var(--u)) rgba(255, 230, 140, 0.8); } }

/* Dealer button */
.game-poker .pk-dealer {
  position: absolute;
  width: calc(44 * var(--u));
  height: calc(44 * var(--u));
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-family: var(--font);
  font-weight: 700;
  font-size: calc(24 * var(--u));
  color: #1A1020;
  background: radial-gradient(circle at 40% 35%, #FFFFFF, #EDE6D6 55%, #B8AE98);
  box-shadow: inset 0 0 0 calc(3 * var(--u)) #C99A3A, 0 calc(3 * var(--u)) calc(6 * var(--u)) rgba(0, 0, 0, 0.6);
  transition: left 0.5s cubic-bezier(.3,.8,.3,1), top 0.5s cubic-bezier(.3,.8,.3,1);
  z-index: 6;
  pointer-events: none;
}

/* Bots' cards (backs while hidden, faces at showdown) and their action bubbles */
.game-poker .pk-back { z-index: 3; pointer-events: none; opacity: 0; transform: translateY(calc(-30 * var(--u))) scale(0.6); transition: opacity 0.25s, transform 0.3s cubic-bezier(.2,1.3,.4,1); }
.game-poker .pk-back img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 calc(4 * var(--u)) calc(6 * var(--u)) rgba(0, 0, 0, 0.6)); }
.game-poker .pk-back.in { opacity: 1; transform: none; }
.game-poker .pk-back.gone { opacity: 0; transform: translateY(calc(20 * var(--u))) scale(0.8); }
.game-poker .pk-show { z-index: 3; pointer-events: none; opacity: 0; transition: opacity 0.2s; }
.game-poker .pk-show.in { opacity: 1; }
.game-poker .pk-show .vg-card { position: absolute; top: 0; }
.game-poker .pk-show .vg-card:first-child { left: 0; transform: rotate(-8deg); }
.game-poker .pk-show .vg-card:last-child { left: calc(42 * var(--u)); transform: rotate(7deg); }
.game-poker .pk-bubble {
  position: absolute;
  z-index: 7;
  padding: calc(8 * var(--u)) calc(16 * var(--u));
  border-radius: calc(22 * var(--u));
  white-space: nowrap;
  font-family: var(--font);
  font-weight: 600;
  font-size: calc(24 * var(--u));
  line-height: 1;
  color: #2A1503;
  background: linear-gradient(180deg, #FFF3C8, #F2C665);
  box-shadow: 0 0 0 calc(2 * var(--u)) #8A5A12, 0 calc(4 * var(--u)) calc(10 * var(--u)) rgba(0, 0, 0, 0.6);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.6);
  transition: opacity 0.18s, transform 0.25s cubic-bezier(.2,1.5,.4,1);
}
.game-poker .pk-bubble.show { opacity: 1; transform: translate(-50%, -50%); }
.game-poker .pk-bubble.left { transform-origin: 0 100%; }
.game-poker .pk-bubble.right { transform-origin: 100% 100%; }
.game-poker .pk-bubble.fold { color: #F0E4FF; background: linear-gradient(180deg, #4B3466, #2A1A3E); box-shadow: 0 0 0 calc(2 * var(--u)) #6E5196, 0 calc(4 * var(--u)) calc(10 * var(--u)) rgba(0, 0, 0, 0.6); }

/* Community cards, tilted onto the felt */
.game-poker .pk-board { z-index: 2; pointer-events: none; transform-style: preserve-3d; }
.game-poker .pk-bslot { position: absolute; top: 0; width: var(--cw); height: calc(var(--cw) * 1.4); transform-origin: 50% 50%; }
.game-poker .pk-hole { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.game-poker .pk-hslot { transform-origin: 50% 80%; }
.game-poker .pk-hole .pk-hslot > .vg-card { box-shadow: 0 0 calc(26 * var(--u)) calc(4 * var(--u)) rgba(255, 196, 110, 0.45), 0 calc(4 * var(--u)) calc(10 * var(--u)) rgba(0, 0, 0, 0.45); }
.game-poker .pk-board .vg-card,
.game-poker .pk-hole .vg-card { border-radius: calc(var(--cw) * 0.07); }
.game-poker .vg-card { box-shadow: 0 calc(4 * var(--u)) calc(10 * var(--u)) rgba(0, 0, 0, 0.45); transition: filter 0.3s, box-shadow 0.3s; }
.game-poker .vg-card:not(.painted) { box-shadow: inset 0 0 0 calc(1.5 * var(--u)) rgba(0, 0, 0, 0.12), 0 calc(4 * var(--u)) calc(10 * var(--u)) rgba(0, 0, 0, 0.45); }
.game-poker .pk-in { animation: pk-in 0.32s cubic-bezier(.2,.9,.3,1) both; }
@keyframes pk-in { from { transform: translateY(calc(-180 * var(--u))) scale(0.4) rotate(-12deg); opacity: 0; } }
.game-poker .pk-hole .pk-in { animation-name: pk-in-hole; }
@keyframes pk-in-hole { from { transform: translateY(calc(-420 * var(--u))) scale(0.4) rotate(20deg); opacity: 0; } }
.game-poker .dim > .vg-card, .game-poker .vg-card.dim { filter: brightness(0.5) saturate(0.7); }
.game-poker .best > .vg-card, .game-poker .vg-card.best, .game-poker .pk-hole .pk-hslot.best > .vg-card {
  box-shadow: 0 0 0 calc(4 * var(--u)) #FFD966, 0 0 calc(22 * var(--u)) calc(6 * var(--u)) rgba(255, 200, 70, 0.75);
}
.game-poker .pk-bslot.best { animation: pk-lift 0.4s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes pk-lift { to { translate: 0 calc(-10 * var(--u)); } }

/* Result line between the board and your cards */
.game-poker .pk-banner {
  position: absolute;
  left: 50%;
  z-index: 8;
  display: flex;
  align-items: baseline;
  gap: calc(14 * var(--u));
  padding: calc(9 * var(--u)) calc(30 * var(--u)) calc(8 * var(--u));
  border-radius: calc(30 * var(--u));
  white-space: nowrap;
  line-height: 1.05;
  background: linear-gradient(180deg, rgba(40, 10, 16, 0.94), rgba(18, 4, 8, 0.94));
  box-shadow: 0 0 0 calc(3 * var(--u)) #D9A03A, 0 calc(8 * var(--u)) calc(20 * var(--u)) rgba(0, 0, 0, 0.6);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.7);
  transition: opacity 0.2s, transform 0.3s cubic-bezier(.2,1.5,.4,1);
}
.game-poker .pk-banner.show { opacity: 1; transform: translate(-50%, -50%); }
.game-poker .pk-banner b {
  font-family: var(--serif);
  font-weight: 900;
  font-size: calc(32 * var(--u));
  color: #FFE29A;
  text-shadow: 0 calc(2 * var(--u)) 0 #6A3A08;
}
.game-poker .pk-banner span { font-size: calc(23 * var(--u)); font-weight: 600; color: #F7EEDC; }
.game-poker .pk-banner.lose b { color: #F0E4FF; text-shadow: 0 calc(2 * var(--u)) 0 #3A1A5A; }

/* Pot flying to the winner */
.game-poker .pk-fly { z-index: 9; pointer-events: none; transition: left 0.75s cubic-bezier(.5,0,.3,1), top 0.75s cubic-bezier(.5,0,.3,1), opacity 0.3s 0.6s; filter: drop-shadow(0 calc(4 * var(--u)) calc(4 * var(--u)) rgba(0, 0, 0, 0.6)); }
.game-poker .pk-fly.go { opacity: 0; }
.game-poker .pk-fly svg { width: 100%; height: 100%; display: block; }

/* Raise slider: covers the painted fill + knob and draws a live one */
.game-poker .pk-slider {
  z-index: 3;
  background: #060305;
  touch-action: none;
  cursor: pointer;
}
.game-poker .pk-track {
  position: absolute;
  border-radius: calc(11 * var(--u));
  background: linear-gradient(180deg, #0D0A0E, #141016 40%, #110D12);
  box-shadow: 0 0 0 calc(1.5 * var(--u)) #2A1A10, inset 0 calc(1 * var(--u)) calc(2 * var(--u)) rgba(0, 0, 0, 0.8);
}
.game-poker .pk-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: calc(11 * var(--u));
  background: linear-gradient(180deg, #D297FD 0%, #B672FA 20%, #8A43F5 42%, #5A07F5 62%, #6607F7 82%, #55105F 100%);
  box-shadow: 0 0 calc(8 * var(--u)) rgba(140, 70, 255, 0.55);
}
.game-poker .pk-knob { position: absolute; border-radius: 50%; filter: drop-shadow(0 calc(3 * var(--u)) calc(4 * var(--u)) rgba(0, 0, 0, 0.7)); }
.game-poker .pk-slider.off .pk-fill { filter: saturate(0.3) brightness(0.6); }
.game-poker .pk-slider.off .pk-knob { filter: brightness(0.6) saturate(0.5); }
.game-poker .pk-value {
  display: grid;
  place-items: center;
  font-family: -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
  font-weight: 500;
  font-size: calc(33 * var(--u));
  line-height: 1;
  color: #F7E8BE;
  pointer-events: none;
  z-index: 3;
}
.game-poker .pk-value.off { color: rgba(255, 255, 255, 0.45); }
.game-poker .pk-step { border-radius: 50%; z-index: 3; }
.game-poker .pk-step.pressed, .game-poker .pk-step:active { background: rgba(255, 255, 255, 0.12); }
.game-poker .pk-step:disabled::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: rgba(8, 3, 16, 0.55); }

.game-poker .pk-preset {
  display: grid;
  place-items: center;
  z-index: 3;
  cursor: pointer;
  border-radius: calc(16 * var(--u));
}
.game-poker .pk-preset span {
  font-family: -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
  font-weight: 500;
  font-size: calc(26 * var(--u));
  line-height: 1;
  color: #FFFFFF;
  white-space: nowrap;
}
.game-poker .pk-preset.on span { color: #2A1503; }
.game-poker .pk-preset.off span { color: rgba(255, 255, 255, 0.45); }
.game-poker .pk-preset:active { filter: brightness(1.2); }

/* FOLD / middle / RAISE: the painting is the button */
.game-poker .pk-btn { z-index: 3; border-radius: calc(40 * var(--u)); }
.game-poker .pk-btn:not(:disabled):active { background: rgba(255, 255, 255, 0.12); }
.game-poker .pk-btn:disabled::after { content: ""; position: absolute; inset: calc(4 * var(--u)); border-radius: calc(38 * var(--u)); background: rgba(8, 3, 16, 0.55); }
.game-poker .pk-call-txt { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.game-poker .pk-call-txt b {
  display: block;
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1;
  font-size: calc(58 * var(--u));
  letter-spacing: 0.01em;
  background: linear-gradient(180deg, #FFF4CF 0%, #F9DD98 40%, #E9B65A 70%, #C98A2E 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 calc(3 * var(--u)) calc(2 * var(--u)) rgba(20, 0, 40, 0.75));
}
.game-poker .pk-call-txt b { transform: scaleX(0.84); }
.game-poker .pk-call-txt.two b:first-child { font-size: calc(53 * var(--u)); margin-top: calc(-4 * var(--u)); }
.game-poker .pk-call-txt.two b:last-child { font-size: calc(43 * var(--u)); margin-top: calc(10 * var(--u)); }
.game-poker .pk-call-txt b.deal { font-size: calc(60 * var(--u)); }

/* Rules: the painted TEXAS HOLD'EM, or a long-press on the felt */
.game-poker .pk-title { z-index: 1; border-radius: calc(20 * var(--u)); }
.game-poker .pk-felt { z-index: 0; }

.game-poker .pk-fine { font-family: -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif; font-weight: 400; font-size: calc(23 * var(--u)); line-height: 1; color: #BDB3CC; word-spacing: 0.08em; transform: translateY(-50%); }
