/* TIMELINE — bottom bar: turn scrubber (left) + event log (right). */

#bottombar { display: flex; align-items: stretch; }

/* ---------- scrubber ---------- */
.tl-scrubber {
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 10px 6px;
  border-right: 1px solid var(--border);
  background: linear-gradient(180deg, var(--panel) 0%, #211b14 100%);
}
.tl-scrubber-inner {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 100%;
  min-width: min-content;
}

.tl-season-label {
  flex: 0 0 auto;
  align-self: flex-start;
  writing-mode: horizontal-tb;
  font-size: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--accent);
  border-left: 2px solid var(--border);
  padding: 2px 6px 2px 6px;
  margin-left: 6px;
  margin-right: 2px;
  white-space: nowrap;
  opacity: 0.85;
}

.tl-tick {
  flex: 0 0 auto;
  width: 30px;
  height: 56px;
  padding: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--panel-light);
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1;
  position: relative;
  transition: background 0.12s, color 0.12s, transform 0.12s;
}
.tl-tick:hover { background: var(--border); color: var(--text); transform: translateY(-2px); }
.tl-tick-initial {
  width: 48px;
  border-style: dashed;
  margin-right: 6px;
}
.tl-tick-initial .tl-tick-num { font-size: 11px; }
/* Scrubber is read-only while replay drives the timeline. */
.tl-scrubber.replay-locked .tl-tick { cursor: default; opacity: 0.55; }
.tl-scrubber.replay-locked .tl-tick:hover { background: var(--panel-light); color: var(--text-dim); transform: none; }
.tl-scrubber.replay-locked .tl-tick.current { opacity: 1; }
.tl-tick-num { padding-bottom: 5px; pointer-events: none; }

/* a turn that recorded events gets a small lit pip at the top */
.tl-tick.has-events::before {
  content: "";
  position: absolute;
  top: 4px; left: 50%;
  transform: translateX(-50%);
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.7;
}

/* season-end turns: distinct autumn-leaf stripe at the base */
.tl-tick.season-end {
  border-color: #8a6a2c;
  background: linear-gradient(180deg, var(--panel-light) 60%, #5a3f17 100%);
}
.tl-tick.season-end::after {
  content: "🍂";
  position: absolute;
  top: 2px; right: 1px;
  font-size: 9px;
  opacity: 0.85;
}

/* first turn of each season: brighter left edge */
.tl-tick.season-start { border-left: 2px solid var(--accent); }

/* current viewed turn */
.tl-tick.current {
  background: var(--accent);
  color: #1a1612;
  border-color: var(--accent);
  font-weight: bold;
  box-shadow: 0 0 0 1px var(--accent), 0 0 8px rgba(200, 164, 77, 0.5);
}
.tl-tick.current .tl-tick-num { color: #1a1612; }
.tl-tick.current.has-events::before { background: #1a1612; opacity: 0.9; }

/* ---------- event log ---------- */
.tl-log {
  flex: 0 0 46%;
  max-width: 46%;
  overflow-y: auto;
  padding: 6px 10px 8px;
  background: var(--panel);
}
.tl-log-head {
  font-size: 12px;
  font-weight: bold;
  color: var(--accent);
  position: sticky;
  top: 0;
  background: var(--panel);
  padding-bottom: 4px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
  z-index: 1;
}
.tl-log-date { font-weight: normal; color: var(--text-dim); font-size: 11px; }
.tl-log-empty { color: var(--text-dim); font-size: 12px; font-style: italic; padding: 6px 2px; }
.tl-log-list { display: flex; flex-direction: column; gap: 4px; }

.ev {
  display: flex;
  gap: 7px;
  font-size: 12px;
  line-height: 1.4;
  padding: 4px 6px;
  border-radius: 3px;
  background: var(--panel-light);
  border-left: 3px solid var(--border);
}
.ev-icon { flex: 0 0 auto; font-size: 14px; line-height: 1.3; }
.ev-body { flex: 1 1 auto; min-width: 0; word-wrap: break-word; }
.ev-body strong { color: var(--text); }

/* type accents */
.ev-battle { border-left-color: #b03a2e; background: #2c1f1a; }
.ev-control { border-left-color: var(--accent); }
.ev-build, .ev-upgrade-landmark { border-left-color: #c87f2f; }
.ev-sp { border-left-color: #cfae4a; }
.ev-season-end { border-left-color: #8a6a2c; background: #261d12; }
.ev-raze, .ev-destroy-landmark { border-left-color: #d4622a; }
.ev-reclaim { border-left-color: #4a9e3f; }
.ev-note { /* free-text annotation row */ }

.ev-scenario { color: var(--text-dim); font-style: italic; }
.ev-winner { color: var(--accent); }
.ev-warn { color: #d4622a; }
.ev-note, .ev-body .ev-note { color: var(--text-dim); font-size: 11px; }
.ev-note-text { color: var(--text-dim); font-style: italic; }
.ev code { font-size: 10px; color: var(--text-dim); }
