/* ==========================================================================
   pages/timeline.css — Search Query Performance Timeline.
   Rendered into #view-timeline by public/js/timeline.js.
   ========================================================================== */

#view-timeline {
  padding: 1.5rem;
}

.tl-header {
  margin-bottom: 1.5rem;
}

.tl-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.tl-subtitle {
  color: var(--text-m);
  font-size: 0.88rem;
  margin-top: 0.25rem;
}

/* ── Summary tiles ─────────────────────────────────────────────────── */
.tl-summary-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.tl-summary-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  min-width: 0;
}

.tl-summary-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-m);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.tl-summary-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Prompt rows + sparklines ──────────────────────────────────────── */
.tl-prompt-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tl-prompt-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
}

.tl-prompt-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.tl-prompt-text {
  font-size: 0.85rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tl-trend-badge {
  display: inline-flex;
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 99px;
  font-weight: 600;
  width: fit-content;
  text-transform: capitalize;
}

.tl-trend-badge.tl-improving { background: rgba(5, 150, 105, 0.15); color: #059669; }
.tl-trend-badge.tl-dropping  { background: rgba(220, 38, 38, 0.15); color: #DC2626; }
.tl-trend-badge.tl-stable    { background: rgba(217, 119, 6, 0.15); color: #D97706; }

.tl-sparkline {
  width: 200px;
  height: 48px;
  flex-shrink: 0;
}

.tl-sparkline canvas {
  display: block;
}

.tl-current-rate {
  width: 48px;
  text-align: right;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .tl-sparkline    { display: none; }
  .tl-summary-row  { grid-template-columns: 1fr; }
}
