/* Tracker variation: layered on ../videos/style.css. Video and action log side by side, playlist as a rail below. */

:root {
  --raise: #ff9a52;
  --call: #5fcff7;
}

.tracker-page {
  grid-template-columns: minmax(0, 1fr);
}

.stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 16px;
}

/* ---------- Tracker panel (as tall as the video) ---------- */

.tracker {
  position: relative;
  min-height: 320px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--navy-2), var(--navy));
}

.tracker-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 14px 14px 6px;
}

.tracker-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.pot,
.hero-stack {
  display: flex;
  flex-direction: column;
}

.hero-stack {
  align-items: flex-end;
}

.pot-label {
  font-family: var(--cond);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.pot-value {
  font-family: var(--cond);
  font-weight: 800;
  font-size: 30px;
  line-height: 1;
  color: var(--gold-hi);
}

.hero-value {
  font-family: var(--cond);
  font-weight: 700;
  font-size: 20px;
  line-height: 1.1;
}

.cards-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.hole,
.board {
  display: flex;
  gap: 4px;
}

.hole {
  padding-right: 12px;
  border-right: 1px solid var(--line);
}

.slot {
  width: 34px;
  aspect-ratio: 5 / 7;
  border-radius: 5px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
}

/* ---------- Action log ---------- */

.log {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  margin: 0;
  padding: 0 2px 8px 0;
  list-style: none;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.log-heading {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 12px 0 4px;
}

.log-heading:first-child {
  margin-top: 0;
}

.log-street {
  margin-right: 6px;
  font-family: var(--cond);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.log-row {
  display: grid;
  grid-template-columns: 34px 42px minmax(0, 1fr) auto 56px;
  align-items: baseline;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
}

.log-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* The log is re-rendered on every action, so only the row that just happened animates in. */
.log-row.current {
  background: rgba(210, 174, 99, 0.13);
  animation: row-in 0.25s ease-out;
}

@keyframes row-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
}

.log-time {
  font-family: var(--cond);
  font-weight: 600;
  font-size: 13px;
  color: var(--faint);
}

.log-row.current .log-time {
  color: var(--gold);
}

.log-pos {
  font-family: var(--cond);
  font-weight: 700;
  font-size: 13px;
  color: var(--muted);
}

.log-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #c9cfdc;
}

.log-row.hero .log-name {
  font-weight: 700;
  color: var(--gold-hi);
}

.log-act {
  font-weight: 600;
  white-space: nowrap;
}

.log-act.raise,
.log-act.bet {
  color: var(--raise);
}

.log-act.call {
  color: var(--call);
}

.log-act.check {
  color: var(--ink);
}

.log-act.fold {
  color: var(--faint);
}

.log-act.win {
  color: var(--gold-hi);
}

.log-pot {
  text-align: right;
  font-family: var(--cond);
  font-weight: 600;
  font-size: 13px;
  color: var(--muted);
}

.log-result {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 10px;
  padding: 10px 8px 4px;
  border-top: 1px solid var(--line);
  font-family: var(--cond);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  animation: row-in 0.3s ease-out;
}

.log-result-value {
  font-size: 22px;
}

.log-result.win .log-result-value {
  color: var(--win);
}

.log-result.loss .log-result-value {
  color: var(--loss);
}

/* ---------- Details + playlist rail ---------- */

.details {
  margin-top: 18px;
}

.details .facts {
  margin-top: 10px;
}

.rail {
  margin-top: 24px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--navy-2), var(--navy));
}

.rail h2 {
  margin: 0;
  font-family: var(--cond);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.rail .items {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 1fr);
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-color: var(--line) transparent;
}

.rail .item-button {
  grid-template-columns: 1fr;
  gap: 8px;
}

/* ---------- Tablet & phone ---------- */

@media (max-width: 960px) {
  /* The stage dissolves so the sticky video stays on screen for the whole page. */
  .stage {
    display: contents;
  }

  .tracker {
    height: min(44svh, 380px);
    margin: 12px 14px 0;
  }

  .details,
  .rail {
    margin-left: 14px;
    margin-right: 14px;
  }

  .rail .items {
    grid-auto-columns: 72%;
    scroll-snap-type: x mandatory;
  }

  .rail .item {
    scroll-snap-align: start;
  }
}

@media (max-width: 560px) {
  .log-row {
    grid-template-columns: 30px 38px minmax(0, 1fr) auto 48px;
    gap: 6px;
    padding: 5px 4px;
    font-size: 13px;
  }

  .slot,
  .tracker .card.tile-card {
    width: 28px;
  }

  .tracker .card.tile-card {
    font-size: 14px;
  }
}
