/* JACKPOT.EXE — layout-specific styling. base.css owns tokens and primitives. */

/* ===== Layout B: Vertical Console (portrait) ===== */

.layout-b {
  width: 100%;
  height: 100%;
  flex: 1;
  min-height: 0;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--fg);
  border: 1px solid var(--accent-1);
  background: var(--bg);
  overflow: hidden;
}

.lb-header {
  text-align: center;
  border-bottom: 1px dashed var(--fg-mute);
  padding-bottom: 6px;
}
.lb-marquee {
  font-size: 0.9em;
  line-height: 1;
  display: inline-block;
}
.lb-header-meta {
  font-size: 0.85em;
  margin-top: 4px;
  letter-spacing: 0.05em;
}
.lb-header-pal {
  margin-top: 4px;
  font-size: 0.85em;
}

.lb-kpi {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  border: 1px solid var(--fg-mute);
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.3);
}
.lb-kpi .kpi { text-align: center; }
.lb-kpi .kpi-label {
  font-size: 0.7em;
  letter-spacing: 0.1em;
}
.lb-kpi .kpi-value {
  font-size: 1.5em;
  line-height: 1.1;
}

.lb-milestone-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.9em;
}
.lb-milestone-bar { letter-spacing: 0; }

.lb-reels {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.lb-reels > .box-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}
.lb-payline {
  text-align: center;
  letter-spacing: 0;
}
.lb-payline-bonus, .la-reels-footer-bonus {
  text-shadow: 0 0 6px currentColor;
  animation: bonus-banner-pulse 1.6s ease-in-out infinite;
}
@keyframes bonus-banner-pulse {
  0%, 100% { opacity: 0.85; }
  50%      { opacity: 1; text-shadow: 0 0 10px currentColor, 0 0 3px currentColor; }
}
.lb-reel-holder {
  display: flex;
  justify-content: center;
  font-size: 1em;
}
.lb-result {
  text-align: center;
  text-shadow: 0 0 8px currentColor;
  font-size: 1.1em;
  letter-spacing: 0.2em;
  min-height: 1.3em;
  transition: opacity 200ms ease;
}

/* Compact running ledger on mobile. Session events (wins, misses,
   bonus lifecycle) flow in from the left; older entries clip off the
   right edge when they run out of room. No manual scroll. */
.lb-ledger-ribbon {
  display: flex;
  overflow: hidden;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--fg-mute);
  padding: 4px 8px;
  font-size: 0.82em;
  background: rgba(0, 0, 0, 0.3);
  white-space: nowrap;
  min-height: 1.9em;
}
.lb-ledger-label {
  font-size: 0.72em;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  flex: 0 0 auto;
}
.lb-ledger-empty { font-size: 0.8em; flex: 0 0 auto; }
.lb-ledger-chip {
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.lb-narrator { font-size: 0.9em; }
.lb-nar-lines > div + div { margin-top: 2px; }

.lb-cmdbar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.lb-cmdbar .cmdbtn { padding: 10px 4px; }

/* ===== Layout A: Dense HUD (landscape) ===== */

.layout-a {
  width: 100%;
  height: 100%;
  flex: 1;
  min-height: 0;
  padding: 14px 16px 12px;
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  /* minmax(0, 1fr) is critical — plain `1fr` lets the track grow to
     its content min-size, which means a full ledger or tall reels
     would push the whole page past the viewport. */
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  /* Row-gap bigger than column-gap so the absolute-positioned
     .box-title (top:-10px) doesn't overlap the milestone row above. */
  column-gap: 8px;
  row-gap: 16px;
  color: var(--fg);
  border: 1px solid var(--accent-1);
  background: var(--bg);
  font-size: var(--font-size);
  overflow: hidden;
}

.la-title {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--accent-1);
  border-bottom: 1px dashed var(--fg-mute);
  padding-bottom: 6px;
  flex-wrap: wrap;
}
.la-brand {
  font-weight: 600;
  letter-spacing: 0.15em;
}
.la-title-meta, .la-title-state {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.la-milestone {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.la-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  /* overflow: visible — box-titles use top:-10px to overlay the border,
     so a clipping column chops the titles at the column edge. Any
     internal region that can grow (ledger) owns its own scroll. */
}
.la-col-1 { grid-column: 1 / 2; grid-row: 3 / 4; }
.la-col-2 { grid-column: 2 / 3; grid-row: 3 / 4; }
.la-col-3 { grid-column: 3 / 4; grid-row: 3 / 4; }

.la-records-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  row-gap: 3px;
  column-gap: 10px;
  font-size: 0.9em;
}

.la-ledger-box { flex: 1; min-height: 0; }
.la-ledger-box > .box-body { overflow: auto; }
.la-ledger-list { font-size: 0.88em; line-height: 1.45; }
.la-ledger-row {
  display: grid;
  grid-template-columns: 42px 48px 1fr;
  gap: 8px;
  align-items: baseline;
}

.la-reels-box { flex: 1; min-height: 0; }
.la-reels-box > .box-body {
  justify-content: center;
  gap: 8px;
}
.la-reels-stats {
  display: flex;
  justify-content: space-between;
  font-size: 0.95em;
  flex-wrap: wrap;
  gap: 6px;
}
.la-reel-holder {
  display: flex;
  justify-content: center;
  flex: 1;
  min-height: 0;
  align-items: center;
  font-size: 1.2em;
}
.la-reel-holder .reel { padding: 8px 10px; }
.la-reels-footer {
  text-align: center;
  letter-spacing: 0;
}
.la-rs-cr { font-size: 1.3em; }

.la-subrow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.la-bet-ladder {
  display: flex;
  justify-content: space-around;
  align-items: center;
}
.la-spark { font-size: 1.1em; }
.la-spark-summary { font-size: 0.85em; margin-top: 4px; text-align: center; }

.la-paytable-grid {
  display: grid;
  grid-template-columns: auto auto auto auto;
  column-gap: 10px;
  row-gap: 2px;
  font-size: 0.95em;
}
.pt-right { text-align: right; }

.la-row4 {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 10px;
  align-items: stretch;
}
.la-narrator { font-size: 0.95em; }
.la-nar-lines > div + div { margin-top: 2px; }
.la-keys-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  font-size: 0.9em;
}

.la-cmdbar {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.la-cmdbar .cmdbtn { padding: 10px 8px; }

/* Scale font down a touch on very small portrait screens */
@media (max-width: 480px) {
  :root { --font-size: 12px; }
  .lb-cmdbar .cmdbtn { padding: 8px 2px; }
}
