/* Timeline filters bar */
.timeline-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.timeline-filter-btn {
  padding: 6px 14px;
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.timeline-filter-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-light);
}

.timeline-filter-btn.active {
  background: var(--accent-primary);
  color: #fff;
  border-color: var(--accent-primary);
}

/* Timeline */
.timeline {
  position: relative;
  padding: 20px 0;
}

/* Center line */
.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: var(--border-color);
  transform: translateX(-50%);
}

/* Timeline event */
.timeline-event {
  position: relative;
  display: flex;
  align-items: flex-start;
  margin-bottom: 32px;
  width: 100%;
}

/* Alternating layout */
.timeline-event:nth-child(odd) {
  justify-content: flex-start;
  padding-right: calc(50% + 24px);
}

.timeline-event:nth-child(even) {
  justify-content: flex-end;
  padding-left: calc(50% + 24px);
}

/* Event dot on center line */
.timeline-dot {
  position: absolute;
  left: 50%;
  top: 16px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  border: 3px solid var(--border-light);
  transform: translateX(-50%);
  z-index: 2;
  transition: transform var(--transition-fast);
}

.timeline-event:hover .timeline-dot {
  transform: translateX(-50%) scale(1.2);
}

/* Dot colors by event type */
.timeline-dot.dot-evidence { background: var(--accent-primary); border-color: var(--accent-primary); }
.timeline-dot.dot-interview { background: var(--accent-purple); border-color: var(--accent-purple); }
.timeline-dot.dot-discovery { background: var(--accent-success); border-color: var(--accent-success); }
.timeline-dot.dot-incident { background: var(--accent-danger); border-color: var(--accent-danger); }
.timeline-dot.dot-communication { background: var(--accent-info); border-color: var(--accent-info); }
.timeline-dot.dot-financial { background: var(--accent-warning); border-color: var(--accent-warning); }

/* Event card */
.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  width: 100%;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.timeline-card:hover {
  border-color: var(--border-light);
  box-shadow: var(--shadow-md);
}

.timeline-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 8px;
}

.timeline-card-date {
  font-size: var(--text-xs);
  color: var(--text-muted);
  white-space: nowrap;
}

.timeline-card-type {
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.timeline-card-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.timeline-card-body {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Key event highlight */
.timeline-event.key-event .timeline-card {
  border-color: var(--accent-warning);
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.15);
}

.timeline-event.key-event .timeline-dot {
  width: 18px;
  height: 18px;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.2);
}

.key-event-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--accent-warning);
  margin-bottom: 6px;
}

/* Responsive: single column on mobile */
@media (max-width: 768px) {
  .timeline::before {
    left: 16px;
  }

  .timeline-event:nth-child(odd),
  .timeline-event:nth-child(even) {
    justify-content: flex-start;
    padding-right: 0;
    padding-left: 44px;
  }

  .timeline-dot {
    left: 16px;
  }

  .timeline-event.key-event .timeline-dot {
    left: 16px;
  }
}

@media (max-width: 480px) {
  .timeline-card { padding: 12px; }
  .timeline-filters { gap: 6px; }
}
