/* ===== Video Poker's machine skins and its machine picker (docs/plans/games/VIDEO_POKER_PLAN.md 3.3, 4.1): the per-machine
   tokens, the marquee drawings' paint (static/js/vp_cabinet.js `marquee`) and the picker's pop-up (.vpp-*:
   static/js/vp_picker.js). Loaded by the game page (with video_poker.css, the cabinet) and by the lobby, whose Video
   Poker tile opens the same picker. Every colour the picker uses that the lobby lacks has a fallback here. ===== */
:root { --vp-gold: #fcd34d; }

/* The per-machine tokens are typed so a machine change cross-fades them (the skin's 250 ms fade, kept under reduced
   motion: a fade is not motion). */
@property --vp-frame { syntax: '<color>'; inherits: true; initial-value: #1e3a9e; }
@property --vp-accent { syntax: '<color>'; inherits: true; initial-value: #7c9bff; }
@property --vp-marquee { syntax: '<color>'; inherits: true; initial-value: #0d1f66; }
@property --vp-marquee-2 { syntax: '<color>'; inherits: true; initial-value: #2b4fd0; }
@property --vp-button { syntax: '<color>'; inherits: true; initial-value: #3b63e6; }
@property --vp-glow { syntax: '<color>'; inherits: true; initial-value: rgba(124, 155, 255, .55); }

/* ---------- the skins: one token block per machine (gaming/video_poker_engine.py MACHINES; a machine without a block
   fails tests/frontend/test_video_poker_page.py) ---------- */
[data-machine="jacks"] {                 /* Jacks or Better: royal blue and silver, kept clean */
    --vp-frame: #1e3a9e; --vp-accent: #7c9bff; --vp-accent-rgb: 124, 155, 255; --vp-marquee: #0b1b5c; --vp-marquee-2: #2a4fd2;
    --vp-button: #3561e8; --vp-glow: rgba(124, 155, 255, .55); --vp-mq-ink: #f1f4ff; --vp-mq-edge: #0a1240; }
[data-machine="ddb"] {                   /* Double Double Bonus: deep red with warm lights */
    --vp-frame: #8c0f1f; --vp-accent: #ff7a6b; --vp-accent-rgb: 255, 122, 107; --vp-marquee: #3d040c; --vp-marquee-2: #b0142b;
    --vp-button: #d82a3c; --vp-glow: rgba(255, 150, 90, .6); --vp-mq-ink: #ffe9c4; --vp-mq-edge: #2a0207; }
[data-machine="deuces"] {                /* Deuces Wild: emerald green and white */
    --vp-frame: #0a7448; --vp-accent: #44e396; --vp-accent-rgb: 68, 227, 150; --vp-marquee: #032c1b; --vp-marquee-2: #0d8c55;
    --vp-button: #14ad66; --vp-glow: rgba(68, 227, 150, .6); --vp-mq-ink: #f2fff8; --vp-mq-edge: #021d12; }
#vp-root, .vpp-m { transition: --vp-frame .25s ease, --vp-accent .25s ease, --vp-marquee .25s ease, --vp-marquee-2 .25s ease,
    --vp-button .25s ease, --vp-glow .25s ease; }

/* ---------- the marquee drawings' paint (the cabinet's marquee and the picker's panels) */
.vp-mq-svg { width: 100%; height: 100%; display: block; overflow: visible; }
.vp-mq-name { fill: var(--vp-mq-ink); font-family: 'Righteous', 'Arial Black', sans-serif; letter-spacing: 3px;
    stroke: var(--vp-mq-edge); stroke-width: 5px; paint-order: stroke; stroke-linejoin: round; }
.vp-mq-gem { fill: var(--vp-accent); stroke: #0a1240; stroke-width: 1.5; }
.vp-mq-two { fill: #f4fff9; stroke: var(--vp-accent); stroke-width: 4px; paint-order: stroke; filter: drop-shadow(0 0 6px var(--vp-glow)); }
.vp-mq-halo { stop-color: var(--vp-accent); stop-opacity: .45; }
html.gfx-low .vp-mq-two { filter: none; }
html.gfx-low .vp-mq-glow { display: none; }

/* ---------- the machine picker (static/js/vp_picker.js): the page's and the lobby's ---------- */
.vpp { position: fixed; inset: 0; z-index: 90; display: none; align-items: center; justify-content: center; padding: 16px;
    background: rgba(2, 3, 8, .72); }
.vpp.open { display: flex; animation: vppIn .2s ease; }
@keyframes vppIn { from { opacity: 0; } to { opacity: 1; } }
.vpp-modal { --ar-accent-rgb: 195, 202, 216; width: min(1060px, 100%); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto;
    padding: 20px 22px 22px; color: #e4e4e7; background: var(--vp-glass-2, rgba(9, 9, 13, .8)); border-color: rgba(195, 202, 216, .35); }
.vpp-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 16px; }
.vpp-kicker { font-size: 10px; font-weight: 800; letter-spacing: .28em; text-transform: uppercase; color: #aab3c7; }
.vpp-title { margin: 2px 0 4px; font-family: 'Righteous', 'Inter', sans-serif; font-size: 26px; letter-spacing: .04em; color: #f4f6fb; }
.vpp-sub { margin: 0; font-size: 13px; color: #a1a1aa; }
.vpp-x { flex-shrink: 0; width: 36px; height: 36px; border-radius: 10px; font-size: 22px; line-height: 1; color: #d4d4d8; background: rgba(255,255,255,.06); }
.vpp-x:hover { background: rgba(255,255,255,.12); }
.vpp-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.vpp-m { display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; border: 1px solid rgba(var(--vp-accent-rgb), .45);
    background: linear-gradient(180deg, color-mix(in srgb, var(--vp-marquee) 70%, #000), rgba(6, 7, 12, .95) 55%); }
.vpp-m.cur { box-shadow: 0 0 0 2px var(--vp-accent), 0 10px 30px rgba(0,0,0,.45); }
.vpp-art { height: 96px; padding: 10px 14px; background: radial-gradient(120% 140% at 50% 0%, var(--vp-marquee-2), var(--vp-marquee) 70%);
    border-bottom: 3px solid var(--vp-frame); }
.vpp-art .vp-mq-svg { width: 100%; height: 100%; }
.vpp-body { flex: 1; padding: 12px 14px 4px; }
.vpp-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.vpp-name { margin: 0; font-family: 'Righteous', 'Inter', sans-serif; font-size: 18px; letter-spacing: .03em; color: #f4f6fb; }
.vpp-tag { font-size: 9px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; padding: 3px 7px; border-radius: 999px;
    color: #0b0c10; background: var(--vp-accent); }
.vpp-desc { margin: 4px 0 8px; font-size: 13px; color: #c7cad6; }
.vpp-live { margin: 0 0 8px; font-size: 12px; font-weight: 800; color: var(--vp-gold); }
.vpp-facts { display: grid; gap: 4px; margin: 0 0 10px; }
.vpp-facts > div { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; }
.vpp-facts dt { color: #a1a1aa; }
.vpp-facts dd { margin: 0; font-family: 'JetBrains Mono', monospace; font-weight: 700; color: #f4f6fb; }
.vpp-toggle { font-size: 10px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: var(--vp-accent); padding: 4px 0; }
.vpp-toggle::after { content: ' +'; }
.vpp-toggle[aria-expanded="true"]::after { content: ' −'; }
.vpp-table { margin: 6px 0 4px; }
.vpp-table table { width: 100%; border-collapse: collapse; font-size: 12px; }
.vpp-table th, .vpp-table td { padding: 3px 0; border-bottom: 1px solid rgba(63, 63, 70, .5); text-align: left; font-weight: 600; color: #d4d4d8; }
.vpp-table thead th { font-size: 9.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #8b8fa3; }
.vpp-table td, .vpp-table thead th:last-child { text-align: right; font-family: 'JetBrains Mono', monospace; }
.vpp-table p { margin: 6px 0 0; font-size: 11px; line-height: 1.45; color: #a1a1aa; }
.vpp-play { display: block; margin: 8px 14px 14px; padding: 11px 12px; border-radius: 12px; text-align: center; font-weight: 900; font-size: 13px;
    letter-spacing: .1em; text-transform: uppercase; color: #fff; text-decoration: none;
    background: linear-gradient(180deg, color-mix(in srgb, var(--vp-button) 60%, #fff), var(--vp-button) 50%, color-mix(in srgb, var(--vp-button) 70%, #000));
    box-shadow: 0 4px 0 color-mix(in srgb, var(--vp-button) 45%, #000), inset 0 1px 0 rgba(255,255,255,.5); }
.vpp-play:hover { filter: brightness(1.08); }
.vpp-play:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (max-width: 860px) {
    .vpp { align-items: flex-end; padding: 8px; }
    .vpp-modal { padding: 16px 14px; border-radius: 18px; }
    .vpp-list { grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .vpp-art { height: 68px; padding: 6px 10px; }
    .vpp-body { padding: 10px 12px 2px; }
    .vpp-play { margin: 4px 12px 12px; padding: 9px; }
    .vpp-title { font-size: 21px; }
}
html.vpp-on { overflow: hidden; }
html.calm-motion .vpp.open { animation: none; }
