/* /plugins/lottery/assets/css/views/draw-stages/lights.css */
/* Draw stage "lights" (views/draw-stages/lights.js). The theme draws the lamp
   and lays the lamps out; this is when and how they light. */
.lt-stage {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-end;
  gap: var(--lt-gap, 8px);
  max-width: var(--lt-max, 330px);
  margin: 0 auto;
}
.lt-unit {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: var(--lt-w, 40px);
}
.lt-lamp { position: relative; width: 100%; }
.lt-lamp svg { display: block; width: 100%; height: auto; }
.lt-glow {
  position: absolute;
  left: 50%;
  top: var(--lt-glow-y, 20%);
  width: var(--lt-glow, 76px);
  height: var(--lt-glow, 76px);
  margin: calc(var(--lt-glow, 76px) / -2) 0 0 calc(var(--lt-glow, 76px) / -2);
  border-radius: 50%;
  background: radial-gradient(circle, var(--lt-light, #ffc861) 0, transparent 68%);
  opacity: 0;
  transform: scale(.3);
  transition: opacity .5s, transform .6s cubic-bezier(.2, .8, .3, 1);
  pointer-events: none;
}
.lt-flame {
  opacity: 0;
  transform: scale(.2);
  transform-origin: 50% 100%;
  transition: opacity .25s, transform .45s cubic-bezier(.3, 1.6, .5, 1);
}
.lt-num {
  min-height: 1.2em;
  margin-top: 4px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  direction: ltr;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity .35s .35s, transform .35s .35s;
}

/* Waiting: the dark lamps flicker faintly, one after another. */
.lt-idle .lt-flame { animation: lt-idle 2.4s ease-in-out infinite; animation-delay: calc(var(--i) * .3s); }
@keyframes lt-idle { 0%, 70%, 100% { opacity: 0; } 80% { opacity: .22; transform: scale(.55); } }

.is-lit .lt-glow { opacity: .6; transform: scale(1); }
.is-lit .lt-flame { opacity: 1; transform: scale(1); animation: lt-flicker 1.6s ease-in-out .5s infinite; }
.is-lit .lt-num { opacity: 1; transform: none; }
@keyframes lt-flicker { 50% { transform: scale(.94, 1.06); } }

/* A tube rather than a flame: it buzzes on. */
.lt-neon .lt-flame { transform: none; transition: none; }
.lt-neon.lt-idle .lt-flame { animation-name: lt-idle-neon; }
@keyframes lt-idle-neon { 0%, 76%, 84%, 100% { opacity: 0; } 80% { opacity: .18; } }
.lt-neon .is-lit .lt-flame { animation: lt-buzz .5s linear; }
@keyframes lt-buzz { 0% { opacity: 0; } 15% { opacity: 1; } 25% { opacity: .15; } 45% { opacity: 1; } 55% { opacity: .4; } 100% { opacity: 1; } }

.lt-done .is-lit .lt-glow { animation: lt-swell 1s ease-in-out 2; animation-delay: calc(var(--i) * .08s); }
@keyframes lt-swell { 50% { opacity: .95; transform: scale(1.18); } }

.lt-token {
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--lt-token-bg, #2a1608);
  color: var(--lt-token-ink, #ffd27a);
  box-shadow: 0 0 0 2px var(--lt-token-ring, #e0a43a), 0 0 14px -2px var(--lt-light, #ffc861);
  font-weight: 800;
  direction: ltr;
}
.lt-token.lt-pop { animation: lt-pop .4s cubic-bezier(.34, 1.4, .64, 1); }
@keyframes lt-pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .lt-glow, .lt-flame, .lt-num { transition: none; }
  .lt-idle .lt-flame, .is-lit .lt-flame, .lt-neon .is-lit .lt-flame,
  .lt-done .is-lit .lt-glow, .lt-token.lt-pop { animation: none; }
}

/* /plugins/lottery/assets/css/themes/prism/views/draw-stage.css */
/* Prism: the draw's spectrum (lottery/draw-overlay.php, draw stage
   "lights"). */
/* On the overlay, so the tray and the winner cards get them too. */
#lotteryDrawOverlay {
  --lt-token-bg: #11131c;
  --lt-token-ink: #f4f5f7;
  --lt-token-ring: #7c5cff;
}
.psl-wrap { width: 320px; padding-top: 74px; }
/* The beam comes in from the left, the prism splits it. */
.psl-prism { position: absolute; left: 50%; top: 0; width: 64px; height: 56px; margin-left: -32px; background: linear-gradient(135deg, #c9d2e6, #7d879e); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.psl-wrap::before { content: ''; position: absolute; left: 0; top: 27px; width: calc(50% - 16px); height: 3px; background: linear-gradient(90deg, transparent, #11131c); }
.psl-stage { --lt-w: 34px; gap: 4px; }
.psl-stage .lt-unit { --c: #ff4d4d; }
.psl-stage .lt-unit:nth-child(7n+2) { --c: #ff9a3c; }
.psl-stage .lt-unit:nth-child(7n+3) { --c: #ffd84d; }
.psl-stage .lt-unit:nth-child(7n+4) { --c: #4fd17a; }
.psl-stage .lt-unit:nth-child(7n+5) { --c: #3fa7ff; }
.psl-stage .lt-unit:nth-child(7n+6) { --c: #5b6cff; }
.psl-stage .lt-unit:nth-child(7n) { --c: #b05bff; }
.psl-band { position: relative; height: 70px; border-radius: 3px; background: #1a1d29; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.psl-lit { position: absolute; inset: 0; border-radius: 3px; background: linear-gradient(var(--c), color-mix(in srgb, var(--c) 55%, #11131c)); transform: none; }
.psl-stage .is-lit .lt-flame { animation: none; }
.psl-stage .lt-glow { --lt-glow: 70px; --lt-glow-y: 35px; background: radial-gradient(circle, var(--c) 0, transparent 68%); }
.psl-stage .lt-num { position: absolute; left: 0; right: 0; top: 26px; margin: 0; font-family: var(--font-display, sans-serif); font-size: 15px; color: #11131c; }

