/* WarcraftLens v2 — Timeline tab styles (DESIGN-PORT-V2 Phase 6)
   Ported from prototype Fight Timeline.html. Class names match the JS emitter
   in site/js/ui/timeline-view.js. Phase 6 ships without playhead/zoom/search/
   filter chrome — those layers can be added in a follow-up session once the
   base render is verified live.
*/

/* ── Banner (sparse encounter-meta) ────────────────────────────────────────── */
.tl-banner {
  background: color-mix(in srgb, var(--grade-low) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--grade-low) 50%, transparent);
  color: var(--grade-low);
  border-radius: var(--rad);
  padding: 10px 14px;
  margin-bottom: 12px;
  font-size: 12px;
  font-family: var(--font-mono);
}

/* ── Inspector panel ───────────────────────────────────────────────────────── */
.inspector {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
@media (max-width: 1100px) { .inspector { grid-template-columns: 1fr; } }

.insp-card {
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--rad);
  padding: 14px 16px;
}
.insp-card h5 {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text3);
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--border);
  display: flex;
  justify-content: space-between;
}
.insp-card h5 small {
  font-family: var(--font-mono);
  color: var(--cc-bright);
  letter-spacing: 0;
  text-transform: none;
  font-size: 11px;
  font-weight: 500;
}

.insp-snap {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.insp-snap__item {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 8px 10px;
}
.insp-snap__lbl {
  font-family: var(--font-display);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text3);
}
.insp-snap__val {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--bright);
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

.insp-meta-lbl {
  font-family: var(--font-display);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text3);
  margin: 4px 0 6px;
}
.insp-active {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}
.insp-active .pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px 3px 4px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text2);
}
.insp-active .pip {
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--bg5);
  font-family: var(--font-display);
  font-size: 8px;
  color: var(--bright);
  font-weight: 700;
}
.insp-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text3);
}
.insp-source-note {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text3);
}
.insp-recent { font-size: 11px; }
.insp-recent__row {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px dashed var(--border);
}
.insp-recent__row:last-child { border-bottom: none; }
.insp-recent__t {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text3);
}
.insp-recent__amt {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--cc-bright);
  font-variant-numeric: tabular-nums;
}

/* ── Timeline track shell ──────────────────────────────────────────────────── */
.tl-area {
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--rad-lg);
  padding: 14px 18px;
  margin-bottom: 16px;
}
.tl-area .sec__hdr { margin-bottom: 10px; }
.tl-area .sec__t {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--bright);
  letter-spacing: 0.06em;
}
.tl-area .sec__t span {
  color: var(--text3);
  font-weight: 400;
  font-size: 11px;
  margin-left: 8px;
}
.tl-area .sec__d {
  font-family: var(--font-body);
  color: var(--text2);
  font-size: 12px;
  margin: 4px 0 6px;
}
.tl-area .sec__meta {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text3);
  margin-bottom: 8px;
}

.tl-tracks { position: relative; padding: 0; }

/* ── Axis ──────────────────────────────────────────────────────────────────── */
.tl-axis {
  position: relative;
  height: 24px;
  margin-left: 130px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}
.tl-axis__phase {
  position: absolute;
  top: 0;
  bottom: -360px;
  border-left: 1px dashed color-mix(in srgb, var(--cc) 50%, transparent);
  z-index: 0;
  pointer-events: none;
}
.tl-axis__phase span {
  position: absolute;
  top: 0;
  transform: translateX(4px);
  font-family: var(--font-display);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--cc);
  text-transform: uppercase;
}
.tl-axis__tick {
  position: absolute;
  bottom: 0;
  width: 1px;
  height: 5px;
  background: var(--border2);
}
.tl-axis__lbl {
  position: absolute;
  bottom: 8px;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text3);
}

/* ── Track rows ────────────────────────────────────────────────────────────── */
.tl-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  align-items: stretch;
  min-height: 36px;
  border-bottom: 1px dashed var(--border);
  position: relative;
}
.tl-row:last-of-type { border-bottom: none; }
.tl-row__lbl {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-right: 10px;
  font-size: 11px;
  color: var(--text2);
}
.tl-row__lbl b {
  font-family: var(--font-display);
  color: var(--bright);
  font-weight: 600;
  font-size: 11px;
}
.tl-row__lbl small {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text3);
  margin-left: auto;
}
.tl-track {
  position: relative;
  min-height: 36px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 3px;
}
.tl-track--tall { min-height: 64px; }

/* ── Cast/mech/death markers ───────────────────────────────────────────────── */
.tl-mark {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 3px;
  cursor: pointer;
  transition: transform 0.12s;
}
.tl-mark:hover { transform: translate(-50%, -50%) scale(1.4); z-index: 5; }
.tl-mark--cast {
  width: 5px;
  height: 18px;
  background: var(--class-druid, var(--cc));
  opacity: 0.7;
}
.tl-mark--cast.cd {
  background: var(--cc-bright);
  width: 7px;
  height: 22px;
  box-shadow: 0 0 6px var(--cc-glow);
  opacity: 1;
}
.tl-mark--boss {
  width: 4px;
  height: 14px;
  background: var(--text3);
  opacity: 0.5;
}
.tl-mark--mech {
  width: 11px;
  height: 11px;
  background: #aabbff;
  transform: translate(-50%, -50%) rotate(45deg);
  border-radius: 2px;
}
.tl-mark--mech:hover {
  transform: translate(-50%, -50%) rotate(45deg) scale(1.3);
}
.tl-mark--death {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #d54c4c;
  border: 2px solid var(--bg);
  box-shadow: 0 0 6px #d54c4c;
  z-index: 4;
}

/* ── HPS curve ─────────────────────────────────────────────────────────────── */
.tl-curve { position: absolute; left: 0; right: 0; top: 0; bottom: 0; }
.tl-curve svg { width: 100%; height: 100%; }
.tl-curve .you {
  fill: url(#tl-area);
  stroke: var(--class-druid, var(--cc));
  stroke-width: 1.5;
}
.tl-curve .top {
  fill: none;
  stroke: var(--text3);
  stroke-width: 1;
  stroke-dasharray: 3 3;
  opacity: 0.6;
}

/* ── Bookmarks lane (markers on a single track) ────────────────────────────── */
.bookmark {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1.5px solid var(--border2);
  cursor: pointer;
  transition: transform 0.12s;
}
.bookmark:hover { transform: translate(-50%, -50%) scale(1.3); z-index: 6; }
.bookmark__kind {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  color: var(--bright);
}
.bookmark__kind--peak  { border-color: #5fdf9f; color: #5fdf9f; }
.bookmark__kind--save  { border-color: var(--cc-bright); color: var(--cc-bright); }
.bookmark__kind--death { border-color: #d54c4c; color: #d54c4c; }
.bookmark__kind--mech  { border-color: #aabbff; color: #aabbff; }
.bookmark__kind--miss  { border-color: var(--grade-low); color: var(--grade-low); }

/* ── Events feed ───────────────────────────────────────────────────────────── */
.evf {
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--rad-lg);
  padding: 14px 18px;
}
.evf h4 {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bright);
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--border);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.evf h4 small {
  font-family: var(--font-mono);
  color: var(--text3);
  letter-spacing: 0;
  text-transform: none;
  font-size: 10px;
  font-weight: 400;
}
.evf__rows { display: flex; flex-direction: column; gap: 2px; }
.evf__row {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  gap: 10px;
  padding: 4px 6px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 11px;
  align-items: center;
}
.evf__row:hover { background: var(--bg2); }
.evf__row--you   .evf__n { color: var(--class-druid, var(--cc-bright)); }
.evf__row--boss  .evf__n { color: var(--text2); }
.evf__row--death .evf__n { color: #d54c4c; font-weight: 600; }
.evf__t { color: var(--text3); }
.evf__a { color: var(--text3); }
.empty-inline {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text3);
  padding: 8px 4px;
}
