/* ============================================================
   Pit page - Pro 5x multi-spin layout (v0.4.39.2)
   ============================================================ */

/* x1/x5 mode toggle bar */
.pit-multi-toggle {
  display: flex;
  justify-content: center;
  gap: 0;
  margin: 12px auto 0;
  max-width: 200px;
}

.pit-toggle-btn {
  flex: 1;
  padding: 8px 20px;
  border: 1px solid rgba(255,215,0,0.4);
  background: transparent;
  color: #c8bfe0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.pit-toggle-btn:first-child { border-radius: 8px 0 0 8px; border-right: none; }
.pit-toggle-btn:last-child  { border-radius: 0 8px 8px 0; }
.pit-toggle-btn.active {
  background: rgba(255,215,0,0.15);
  color: #FFD700;
  border-color: rgba(255,215,0,0.7);
}
.pit-toggle-btn:hover:not(.active) {
  background: rgba(255,215,0,0.06);
  color: #e8e4f5;
}

/* Multi layout: machines grid left, results panel right */
.pit-multi {
  display: flex;
  flex-direction: row;
  gap: 24px;
  align-items: flex-start;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
}

/* Large monitors (27"+): let the x5 multi-spin row spread out instead of capping at 1500px. */
@media (min-width: 1700px) {
  .pit-multi { max-width: 1800px; gap: 32px; }
}
@media (min-width: 2300px) {
  .pit-multi { max-width: 2200px; }
}

.pit-multi-left {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Controls bar above the 5 machines. 1fr auto 1fr keeps SPIN x5 dead-centered
   while the token counter sits flush left. */
.pit-multi-controls {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  background: linear-gradient(180deg, #181228 0%, #0d0a18 100%);
  border: 1px solid rgba(255,215,0,0.22);
  border-radius: 12px;
}
.pit-multi-controls-spacer { width: 100%; }

/* Clean token counter for the x5 bar - its own style, not the borrowed single-machine
   .pit-balance (which looked out of place here). */
.pit-multi-tokens {
  display: flex;
  align-items: baseline;
  gap: 8px;
  justify-self: start;
}
.pit-multi-tokens-value {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
  font-size: 26px;
  font-weight: 800;
  color: #FFD700;
  text-shadow: 0 0 16px rgba(255,215,0,0.45);
  line-height: 1;
}
.pit-multi-tokens-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: #a79ec6;
  text-transform: uppercase;
}

/* Recent drops folded under the live round results in x5 */
.pit-multi-recent-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #a79ec6;
  text-transform: uppercase;
  margin: 18px 0 8px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.07);
}
.pit-multi-recent-list {
  display: flex;
  flex-direction: column;
  gap: var(--pmr-gap);
  /* Reserved, like the standalone strip - Pit.razor shows Take(6) here. See the note on
     .pit-multi-results-list: in x5 five machines report one after another, so an unreserved
     list would step the panel taller five times per pull. */
  height: calc(6 * var(--pmr-row-h) + 5 * var(--pmr-gap));
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

/* Big SPIN x5 button */
.pit-spin-five-btn {
  padding: 12px 28px;
  border-radius: 10px;
  border: 2px solid rgba(255,215,0,0.7);
  background: linear-gradient(135deg, #7C3AED 0%, #4C1D95 100%);
  color: #FFF1A8;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.16em;
  cursor: pointer;
  transition: transform 0.12s, filter 0.15s;
  box-shadow: 0 8px 24px rgba(124,58,237,0.45);
}
.pit-spin-five-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  filter: brightness(1.1);
}
.pit-spin-five-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(0.3);
}

/* One shared marquee for the whole x5 row - replaces the five per-machine
   "CHRONOS PIT" signs (hidden in pit-slot.css). Thin plate, light bevel,
   understated muted gold so it frames the row without competing with it. */
.pit-multi-marquee {
  text-align: center;
  padding: 7px 14px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(76, 29, 149, 0.32) 0%, rgba(26, 14, 46, 0.55) 100%);
  border: 1px solid rgba(255, 215, 0, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 241, 168, 0.22),
    0 1px 3px rgba(0, 0, 0, 0.35);
}
.pit-multi-marquee span {
  display: inline-block;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: 0.42em;
  /* trailing letter-spacing pushes the text right; pad-left re-centers it */
  padding-left: 0.42em;
  color: #E6C766;               /* muted gold - lighter chrome than the frame's #FFD700 */
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
  opacity: 0.9;
}
@media (max-width: 480px) {
  .pit-multi-marquee span { letter-spacing: 0.24em; padding-left: 0.24em; font-size: 11px; }
}

/* 5 machines in an even 5-column grid. They are genuinely shrunk by
   .pit-frame-compact (size vars, not transform), so each fills its 1fr
   column with no overflow and no clipping hacks. minmax(0, 1fr) lets the
   columns shrink below the frame's intrinsic content width. */
.pit-multi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}

/* Results panel - mirrors last-drops styling, including its reserved-height rule.
   --pmr-* are the row metrics both lists in this panel measure themselves against:
   a .pit-multi-row is 7px padding twice around an 18px glyph line. */
.pit-multi-results {
  --pmr-row-h: 32px;
  --pmr-gap: 6px;
  width: 280px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #181228 0%, #0d0a18 100%);
  border: 1px solid rgba(255,215,0,0.22);
  border-radius: 14px;
  padding: 16px 18px 18px;
  color: #e8e4f5;
  min-height: 300px;
}

.pit-multi-results-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: #FFD700;
  margin-bottom: 12px;
}

/* v0.9.6: a pull of x5 reports machine by machine, so this list grew in five steps and the
   whole right-hand panel (and the page under it) stepped taller with it - five reflows while
   the reels were still spinning. Reserved height, scroll inside. Eight rows is the reservation
   rather than the theoretical 15 (5 machines x 3 spins, only some of which pay): a panel tall
   enough for an outcome that almost never happens is dead space on every other pull, and the
   overflow scrolls. */
.pit-multi-results-empty,
.pit-multi-results-list {
  height: calc(8 * var(--pmr-row-h) + 7 * var(--pmr-gap));
}
.pit-multi-results-empty { font-size: 12px; color: #8c84a8; }

.pit-multi-results-list {
  display: flex;
  flex-direction: column;
  gap: var(--pmr-gap);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.pit-multi-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
  border-left: 3px solid rgba(255,215,0,0.4);
  font-size: 12px;
  /* Fixed-height flex column: rows must scroll, not squash. */
  flex: 0 0 auto;
}

.pit-multi-row-machine {
  font-size: 10px;
  font-weight: 800;
  color: #8c84a8;
  min-width: 22px;
}

.pit-multi-row-glyph {
  font-size: 18px;
  line-height: 1;
  min-width: 24px;
}

.pit-multi-row-label {
  flex: 1;
  font-size: 12px;
  color: #e8e4f5;
  font-weight: 600;
}

/* Tier-specific left border colors reuse the same pattern as .drop-row */
.pit-multi-row.tier-common    { border-left-color: #b8c0cc; }
.pit-multi-row.tier-uncommon  { border-left-color: #4a90d9; }
.pit-multi-row.tier-rare      { border-left-color: #f0c419; }
.pit-multi-row.tier-epic      { border-left-color: #e8833a; }
.pit-multi-row.tier-legendary { border-left-color: #e0405a; }

/* Reduced motion: disable pit-multi animations */
@media (prefers-reduced-motion: reduce) {
  .pit-spin-five-btn { transition: none; }
  .pit-toggle-btn    { transition: none; }
}

/* Narrow screens: stack multi layout vertically */
@media (max-width: 900px) {
  .pit-multi {
    flex-direction: column;
  }
  .pit-multi-results {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .pit-multi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .pit-multi-results {
    width: 100%;
  }
  .pit-multi-controls {
    gap: 8px;
    padding: 10px 12px;
  }
  .pit-multi-tokens-value {
    font-size: 20px;
  }
  .pit-spin-five-btn {
    padding: 10px 16px;
    font-size: 13px;
  }
}

