/* ============================================================
   SlotMachine — vintage single-payline slot machine component
   Reskinned to the whobebuyin.app brand palette:
   cyan #55dde0 · blue #33658a · body #2f4858 · yellow #f6ae2d ·
   orange #f26419 · paper white · Inter / Work Sans.
   Reels stack vertically (one full-width column, three equal
   boxes) so each word — however long — gets the same space and
   each box spins and lands on its own stagger.
   ============================================================ */

:root {
  --sm-blue:         #33658a;
  --sm-blue-hi:      #4a7ba3;
  --sm-blue-lo:      #284a63;
  --sm-yellow:       #f6ae2d;
  --sm-yellow-hi:    #ffc35c;
  --sm-yellow-lo:    #d99625;
  --sm-cyan:         #55dde0;
  --sm-cyan-hi:      #9beeef;
  --sm-cyan-lo:      #3ec9cc;
  --sm-orange:       #f26419;
  --sm-orange-lo:    #d95614;
  --sm-body:         #2f4858;
}

.sm-machine {
  position: relative;
  width: min(480px, 92vw);
  margin: 0 auto;
  user-select: none;
  -webkit-user-select: none;
  filter: drop-shadow(0 24px 44px rgba(47, 72, 88, .28));
}

/* ---- marquee ---- */
.sm-marquee {
  position: relative;
  background: linear-gradient(180deg, var(--sm-blue-hi), var(--sm-blue) 55%, var(--sm-blue-lo));
  border: 3px solid var(--sm-blue-lo);
  border-bottom: none;
  border-radius: 14px 14px 0 0;
  padding: 16px 18px 20px;
  text-align: center;
  box-shadow: inset 0 2px 0 rgba(255,255,255,.22), inset 0 -8px 18px rgba(0,0,0,.28);
}
.sm-marquee-title {
  font-family: "Work Sans", "Inter", sans-serif;
  font-weight: 800;
  font-size: clamp(20px, 4.6vw, 30px);
  letter-spacing: .03em;
  color: var(--sm-yellow);
  text-shadow: 0 2px 0 rgba(0,0,0,.28), 0 0 18px rgba(246, 174, 45, .30);
}
.sm-marquee-sub {
  font-family: "Inter", sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: #ffffff;
  opacity: .82;
  margin-top: 4px;
}
.sm-bulbs {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  padding: 0 4px;
}
.sm-bulb {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--sm-cyan-hi), var(--sm-cyan) 55%, var(--sm-cyan-lo));
  box-shadow: 0 0 6px rgba(85, 221, 224, .8);
  animation: sm-bulb-chase 1.1s steps(1) infinite;
}
@keyframes sm-bulb-chase {
  0%, 100% { opacity: 1; }
  50%      { opacity: .18; box-shadow: none; }
}

/* ---- body ---- */
.sm-body {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,0) 12%),
    linear-gradient(180deg, var(--sm-blue), var(--sm-blue-lo));
  border: 3px solid var(--sm-blue-lo);
  border-top: none;
  border-radius: 0 0 16px 16px;
  padding: 24px 24px 20px;
  box-shadow: inset 0 -14px 30px rgba(0,0,0,.30);
}

/* pale bezel around reels */
.sm-reel-case {
  position: relative;
  background: linear-gradient(180deg,
    #ffffff 0%, #dfe8ee 30%,
    #b9c9d4 52%, #dfe8ee 74%,
    #ffffff 100%);
  border-radius: 12px;
  padding: 10px;
  box-shadow: inset 0 2px 3px rgba(255,255,255,.9), inset 0 -3px 6px rgba(47,72,88,.35), 0 4px 10px rgba(0,0,0,.28);
}

.sm-reels {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;   /* single column: three stacked boxes */
  gap: 10px;
  background: var(--sm-blue-lo);
  border-radius: 8px;
  padding: 12px 10px;
  box-shadow: inset 0 4px 14px rgba(0,0,0,.35);
}

.sm-reel {
  position: relative;
  height: 72px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 0%,  rgba(51,101,138,.07), rgba(0,0,0,0) 60%),
    linear-gradient(180deg, #ffffff, #f2f6f9 55%, #e4ecf1);
  border-radius: 6px;
  border: 2px solid var(--sm-blue-lo);
  box-shadow: inset 0 3px 8px rgba(47,72,88,.22), inset 0 -3px 8px rgba(47,72,88,.16);
}
.sm-reel.is-blur .sm-cell {
  filter: blur(2.5px);
}

.sm-reel-strip {
  will-change: transform;
}
.sm-cell {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Work Sans", "Inter", sans-serif;
  font-weight: 700;
  font-size: clamp(20px, 4.4vw, 30px);
  letter-spacing: .01em;
  color: var(--sm-body);
  text-transform: lowercase;
  white-space: nowrap;
  overflow: hidden;
  padding: 0 10px;
}

/* payline markers — bracket the middle box of the stack */
.sm-payline::before,
.sm-payline::after {
  content: "";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: 8px solid transparent;
  z-index: 3;
}
.sm-payline::before {
  left: -2px;
  border-left: 12px solid var(--sm-yellow);
  filter: drop-shadow(1px 0 0 var(--sm-yellow-lo));
}
.sm-payline::after {
  right: -2px;
  border-right: 12px solid var(--sm-yellow);
  filter: drop-shadow(-1px 0 0 var(--sm-yellow-lo));
}

/* ---- result ----
   The slot reserves its full height from the first paint, so revealing
   the words never changes the machine's overall size. */
.sm-result-slot {
  position: relative;
  margin-top: 18px;
  height: 152px;
}
.sm-result {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .45s ease, transform .45s ease;
}
.sm-result.is-shown { opacity: 1; transform: none; }

.sm-result-wait {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Inter", sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #ffffff;
  opacity: .38;
  transition: opacity .3s ease;
  pointer-events: none;
}
.sm-result.is-shown + .sm-result-wait { opacity: 0; }

.sm-words {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  row-gap: 2px;
  max-width: 100%;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 10px;
  padding: 12px 16px;
  font-family: "Work Sans", "Inter", sans-serif;
  font-size: clamp(16px, 4vw, 26px);
  font-weight: 700;
  letter-spacing: .03em;
  color: #ffffff;
}
.sm-words .sm-word { color: var(--sm-cyan); }
.sm-result-hint {
  margin-top: 10px;
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #ffffff;
  opacity: .7;
}

.sm-btn {
  appearance: none;
  cursor: pointer;
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--sm-body);
  background: linear-gradient(180deg, var(--sm-cyan-hi), var(--sm-cyan) 55%, var(--sm-cyan-lo));
  border: 2px solid var(--sm-blue-lo);
  border-radius: 8px;
  padding: 8px 16px;
  box-shadow: 0 3px 0 var(--sm-blue-lo), inset 0 1px 0 rgba(255,255,255,.6);
  transition: transform .08s ease, box-shadow .08s ease, filter .15s ease;
}
.sm-btn:hover  { filter: brightness(1.05); }
.sm-btn:active { transform: translateY(3px); box-shadow: 0 0 0 var(--sm-blue-lo); }

/* Enter Session — the payoff button. Always on the machine, grayed out
   until three words have been assigned and all reels have landed. */
.sm-btn-enter {
  display: block;
  width: 100%;
  margin-top: 18px;
  padding: 13px 16px;
  font-size: 16px;
  color: var(--sm-body);
  background: linear-gradient(180deg, var(--sm-yellow-hi), var(--sm-yellow) 55%, var(--sm-yellow-lo));
  border-color: var(--sm-yellow-lo);
  box-shadow: 0 4px 0 var(--sm-yellow-lo), inset 0 1px 0 rgba(255,255,255,.55);
}
.sm-btn-enter:active { box-shadow: 0 0 0 var(--sm-yellow-lo); }
.sm-btn-enter:disabled {
  cursor: not-allowed;
  color: rgba(47, 72, 88, 0.55);
  background: linear-gradient(180deg, #e3e9ed, #cfd8de 55%, #b9c5cd);
  border-color: #93a3ad;
  box-shadow: 0 4px 0 #93a3ad;
  filter: none;
  transform: none;
}
.sm-btn-enter:disabled:active { transform: none; box-shadow: 0 4px 0 #93a3ad; }

/* ---- controls row ----
   Fixed height so retiring the spin button + lever note after the
   reveal never changes the machine's overall size. */
.sm-controls {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
  min-height: 64px;
}
.sm-controls .sm-note {
  width: 100%;
  text-align: center;
  font-family: "Inter", sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #ffffff;
  opacity: .6;
}

/* ---- lever ---- */
.sm-lever {
  position: absolute;
  top: 68px;
  right: -34px;
  width: 30px;
  height: 170px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}
.sm-lever-arm {
  position: absolute;
  left: 50%;
  bottom: 26px;
  width: 8px;
  height: 118px;
  margin-left: -4px;
  background: linear-gradient(90deg, #eef2f5, #9aa2a8 50%, #f2f4f6);
  border-radius: 4px;
  transform-origin: bottom center;
  transition: transform .18s cubic-bezier(.34,1.56,.64,1);
  box-shadow: 2px 2px 4px rgba(0,0,0,.35);
}
.sm-lever-knob {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #ffb187, var(--sm-orange) 45%, var(--sm-orange-lo));
  border: 2px solid #7a330b;
  box-shadow: 0 3px 6px rgba(0,0,0,.4), inset 0 1px 2px rgba(255,255,255,.5);
}
.sm-lever-base {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 30px;
  border-radius: 6px;
  background: linear-gradient(180deg, #dfe8ee, #b9c9d4);
  border: 2px solid var(--sm-blue-lo);
}
.sm-machine.is-spinning .sm-lever-arm { transform: rotate(68deg); }
@media (max-width: 640px) {
  .sm-lever { display: none; }   /* lever is desktop-only; button covers mobile */
}

/* ---- reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  .sm-bulb { animation: none; }
  .sm-lever-arm { transition: none; }
  .sm-machine.is-spinning .sm-lever-arm { transform: none; }
}
