/* ============================================================
   Money on the Table — slot-machine ROI calculator styles
   ============================================================ */

.game-shell {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  max-width: 760px;
  margin-inline: auto;
}

/* top bar of the machine */
.game-top {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  padding: var(--space-4) var(--space-6);
  background: var(--color-primary); color: var(--color-text-inverse);
}
[data-theme="dark"] .game-top, :root:not([data-theme]) .game-top { color: var(--color-bg); }
.game-top__title { display: flex; align-items: center; gap: var(--space-3); font-family: var(--font-display); font-weight: 600; font-size: var(--text-base); }
.game-top__dots { display: flex; gap: 6px; }
.game-top__dots i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; opacity: .3; display: block; }
.game-top__dots i.active { opacity: 1; background: var(--color-accent); }

.game-body { padding: clamp(var(--space-6), 4vw, var(--space-10)); }

/* steps: only one visible at a time */
.game-step { display: none; }
.game-step.active { display: block; animation: stepIn .4s ease; }
@keyframes stepIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .game-step.active { animation: none; } }

.game-step h3 { font-size: var(--text-xl); margin-bottom: var(--space-3); }
.game-step p.muted { color: var(--color-text-muted); margin-bottom: var(--space-6); max-width: 52ch; }

/* business type grid */
.type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
@media (min-width: 560px) { .type-grid { grid-template-columns: repeat(3, 1fr); } }
.type-btn {
  display: flex; flex-direction: column; gap: var(--space-1); text-align: left;
  padding: var(--space-4); border-radius: var(--radius-lg);
  border: 1px solid var(--color-border); background: var(--color-bg);
  min-height: 44px;
}
.type-btn:hover { border-color: var(--color-accent); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.type-btn[aria-pressed="true"] { border-color: var(--color-accent); background: var(--color-accent-soft); box-shadow: var(--shadow-sm); }
.type-btn b { font-size: var(--text-sm); }
.type-btn span { font-size: var(--text-xs); color: var(--color-text-muted); font-family: var(--font-mono); }

/* sliders */
.sliders { display: grid; gap: var(--space-6); margin-bottom: var(--space-8); }
.slider-field label { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); font-size: var(--text-sm); font-weight: 600; margin-bottom: var(--space-2); }
.slider-field label .val { font-family: var(--font-mono); color: var(--color-accent); font-weight: 700; font-variant-numeric: tabular-nums; }
input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 6px;
  border-radius: var(--radius-full); background: var(--color-surface-dynamic);
  outline-offset: 6px;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 24px; height: 24px; border-radius: 50%;
  background: var(--color-accent); border: 3px solid var(--color-surface); box-shadow: var(--shadow-sm); cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
  width: 24px; height: 24px; border-radius: 50%; background: var(--color-accent);
  border: 3px solid var(--color-surface); box-shadow: var(--shadow-sm); cursor: pointer;
}
.slider-field small { display: block; color: var(--color-text-faint); font-size: var(--text-xs); margin-top: var(--space-2); }

.game-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.game-back { color: var(--color-text-muted); font-size: var(--text-sm); font-weight: 600; padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); }
.game-back:hover { color: var(--color-text); }

/* ---- reels / spin ---- */
.reels {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-2);
  background: var(--color-primary); border-radius: var(--radius-lg);
  padding: var(--space-4); margin-block: var(--space-6) var(--space-6);
}
.reel {
  height: 96px; overflow: hidden; border-radius: var(--radius-md);
  background: var(--color-surface-2); position: relative;
  display: flex; align-items: center; justify-content: center;
}
.reel__strip { display: flex; flex-direction: column; align-items: center; }
.reel__cell { height: 96px; display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-weight: 700; font-size: 1.1rem; color: var(--color-text); }
.reel.spinning .reel__strip { animation: reelspin .12s linear infinite; }
@keyframes reelspin { from { transform: translateY(0); } to { transform: translateY(-96px); } }
.reel__label { position: absolute; bottom: 4px; left: 0; right: 0; text-align: center; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; color: var(--color-text-faint); font-family: var(--font-mono); }
.spin-caption { text-align: center; font-family: var(--font-mono); font-size: var(--text-sm); color: var(--color-text-muted); }

/* ---- reveal of total ---- */
.result-total { text-align: center; margin-bottom: var(--space-8); }
.result-total .cap { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: .14em; text-transform: uppercase; color: var(--color-text-muted); }
.result-total .num {
  font-family: var(--font-display); font-weight: 600; line-height: 1;
  font-size: clamp(2.8rem, 8vw, 5rem); color: var(--color-loss);
  font-variant-numeric: tabular-nums; margin-block: var(--space-2);
}
.result-total .sub { color: var(--color-text-muted); font-size: var(--text-sm); }
.ouch { font-family: var(--font-display); font-size: var(--text-lg); color: var(--color-accent); }

.leak-list { display: grid; gap: var(--space-3); margin-bottom: var(--space-8); }
.leak {
  display: grid; grid-template-columns: 1fr auto; gap: var(--space-2) var(--space-4);
  align-items: center; padding: var(--space-4) var(--space-5);
  background: var(--color-bg); border: 1px solid var(--color-divider); border-radius: var(--radius-lg);
}
.leak__name { font-weight: 600; font-size: var(--text-sm); }
.leak__amt { font-family: var(--font-mono); font-weight: 700; color: var(--color-loss); font-variant-numeric: tabular-nums; }
.leak__bar { grid-column: 1 / -1; height: 6px; border-radius: var(--radius-full); background: var(--color-surface-dynamic); overflow: hidden; }
.leak__bar i { display: block; height: 100%; background: var(--color-loss); border-radius: var(--radius-full); width: 0; transition: width .9s cubic-bezier(0.16,1,0.3,1); }
.leak__fix { grid-column: 1 / -1; font-size: var(--text-xs); color: var(--color-text-muted); }

/* ---- lead capture form ---- */
.lead-form { display: grid; gap: var(--space-4); }
.field { display: grid; gap: var(--space-2); }
.field label { font-size: var(--text-sm); font-weight: 600; }
.field input {
  width: 100%; padding: var(--space-3) var(--space-4); border-radius: var(--radius-md);
  border: 1px solid var(--color-border); background: var(--color-bg); color: var(--color-text);
  min-height: 48px;
}
.field input:focus-visible { border-color: var(--color-accent); outline: 2px solid var(--color-accent); outline-offset: 0; }
.field input[aria-invalid="true"] { border-color: var(--color-loss); }
.field .err { color: var(--color-loss); font-size: var(--text-xs); min-height: 1em; }
.form-row { display: grid; gap: var(--space-4); }
@media (min-width: 520px) { .form-row { grid-template-columns: 1fr 1fr; } }
.form-note { font-size: var(--text-xs); color: var(--color-text-faint); }
.form-status { font-size: var(--text-sm); min-height: 1.2em; }
.form-status.err { color: var(--color-loss); }

/* success state */
.success-state { text-align: center; padding-block: var(--space-6); }
.success-state .tick {
  width: 64px; height: 64px; border-radius: 50%; margin: 0 auto var(--space-5);
  background: var(--color-gain-soft); color: var(--color-gain);
  display: flex; align-items: center; justify-content: center;
}
.success-state h3 { color: var(--color-gain); }
.disclaimer { font-size: var(--text-xs); color: var(--color-text-faint); margin-top: var(--space-6); border-top: 1px solid var(--color-divider); padding-top: var(--space-4); max-width: 60ch; }

/* spinner button state */
.btn[aria-busy="true"] { opacity: .7; pointer-events: none; }
.spin-mini { width: 16px; height: 16px; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin-mini { animation-duration: 1.4s; } }
