/* Homepage "try a demo ticket" (partials/home-play-demo.blade.php). Uses only the tokens from sdz.css, so day/night mode applies.
   Reuses .ball, .ball--hit, .num-grid, .picked, .cost-box (sdz.css) and .chip-btn, .qa-chips (ux.css). */

.play-demo .pd-badge {
  display: inline-block; padding: .25rem .7rem; border-radius: 999px; font-size: .72rem; font-weight: 800; letter-spacing: .08em;
  background: var(--sdz-accent); color: #14193a;
}
.play-demo .pd-card { background: linear-gradient(135deg, rgba(79,70,229,.05), rgba(245,179,1,.07)), var(--sdz-surface); }

/* numbered step headings */
.pd-step { display: flex; align-items: center; gap: .55rem; margin-bottom: .55rem; font-weight: 700; }
.pd-step label { margin: 0; font-weight: 700; }
.pd-num {
  flex: none; display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%;
  background: var(--sdz-accent); color: #14193a; font-weight: 800; font-size: .82rem;
}

/* number grid states: picked = primary, drawn = gold ring, picked and drawn = green */
.play-demo .num-grid button { cursor: pointer; transition: background-color .12s ease, transform .12s ease, border-color .12s ease; touch-action: manipulation; }
.play-demo .num-grid button:hover { border-color: var(--sdz-primary); }
.play-demo .num-grid button.drawn { border-color: var(--sdz-accent); box-shadow: inset 0 0 0 2px var(--sdz-accent); }
.play-demo .num-grid button.on.drawn { background: var(--sdz-success); border-color: var(--sdz-success); box-shadow: none; }
.play-demo .picked { background: var(--sdz-surface); }
.play-demo .picked .ball { cursor: pointer; }
.play-demo .picked .ball.ball--hit { background: var(--sdz-success); border-color: #0f7a35; color: #fff; }

/* what it could win */
.play-demo .pd-win { border-top: 1px dashed rgba(79,70,229,.35); }
.play-demo .pd-win [data-pd-winrows] > div { display: flex; justify-content: space-between; gap: .75rem; padding: .1rem 0; }
.play-demo .pd-win [data-pd-winrows] > div.is-hit { color: var(--sdz-success); font-weight: 700; }
:root[data-theme="dark"] .play-demo .pd-win [data-pd-winrows] > div.is-hit { color: #6ee7a0; }

/* practice draw */
.play-demo .pd-draw { padding: 1rem 1.1rem; border-radius: var(--sdz-radius); border: 1px dashed var(--sdz-line); background: rgba(120,130,170,.07); }
.play-demo .pd-drawn { gap: .55rem; min-height: 52px; }
.play-demo .pd-drawn .ball { width: 52px; height: 52px; font-size: 1.15rem; }
.play-demo .pd-drawn .ball.pd-empty { background: transparent; border: 2px dashed var(--sdz-line); color: transparent; box-shadow: none; }
.play-demo .pd-drawn .ball.pd-drop { animation: ball-pop .45s cubic-bezier(.2,.9,.3,1.4) both; }
.play-demo .pd-drawn .ball.ball--hit { background: var(--sdz-success); border-color: #0f7a35; color: #fff; }

.play-demo .pd-result { padding: .8rem 1rem; border-radius: 10px; border: 1px solid var(--sdz-line); background: var(--sdz-surface); }
.play-demo .pd-result.is-win { border-color: var(--sdz-success); background: rgba(22,163,74,.1); }
.play-demo .pd-out-title { font-weight: 600; }
.play-demo .pd-out-amt { font-size: 1.35rem; font-weight: 900; }
.play-demo .pd-result.is-win .pd-out-amt { color: #15803d; }
:root[data-theme="dark"] .play-demo .pd-result.is-win .pd-out-amt { color: #6ee7a0; }
.play-demo .pd-result.is-lose .pd-out-amt { font-size: 1.05rem; font-weight: 700; color: var(--sdz-muted); }

@media (max-width: 575.98px) {
  .play-demo .pd-drawn .ball { width: 44px; height: 44px; font-size: 1rem; }
}

/* machine numbers: the grey-blue ball from sdz.css, a little smaller than the winning balls */
.play-demo .pd-machine .ball { width: 44px; height: 44px; font-size: 1rem; }
.play-demo .pd-machine .ball.ball--machine { color: #14193a; }

/* guided walkthrough: a panel that stays in view while the part it talks about is ringed */
.play-demo .pd-guide {
  position: sticky; top: .5rem; z-index: 5; margin-bottom: 1.25rem; padding: .85rem 1rem; border-radius: var(--sdz-radius);
  background: var(--sdz-surface); border: 2px solid var(--sdz-accent); box-shadow: 0 .6rem 1.4rem rgba(20,25,58,.2);
}
.play-demo .pd-guide[hidden] { display: none; }
.play-demo .pd-guide-count { font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--sdz-muted); }
.play-demo .pd-guide-title { font-size: 1.05rem; font-weight: 800; outline: none; }
.play-demo .pd-guide-body { margin: .35rem 0 .75rem; font-size: .9rem; min-height: 2.6em; }
:root[data-theme="dark"] .play-demo .pd-guide .btn-close { filter: invert(1) grayscale(1) brightness(1.6); }
.play-demo .pd-focus { outline: 3px solid var(--sdz-accent); outline-offset: 6px; border-radius: 12px; scroll-margin-top: 11rem; }
@media (prefers-reduced-motion: no-preference) {
  .play-demo .pd-focus { animation: pd-pulse 1.6s ease-out 2; }
}
@keyframes pd-pulse { 0% { outline-color: rgba(245,179,1,.2); } 40% { outline-color: var(--sdz-accent); } 100% { outline-color: var(--sdz-accent); } }
@media (max-width: 575.98px) {
  .play-demo .pd-focus { scroll-margin-top: 14rem; }
}
@media (prefers-reduced-motion: reduce) {
  .play-demo .pd-drawn .ball.pd-drop { animation: none; }
  .play-demo .num-grid button { transition: none; }
}
