/* Incident timeline — vertical step-by-step visualization */

.timeline {
  position: relative;
  padding: 0;
  margin: 12px 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(255, 255, 255, 0.07);
}

.timeline-step {
  position: relative;
  padding: 0 0 16px 44px;
}

.timeline-step:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: 9px;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid;
  background: #111118;
  z-index: 1;
}

.timeline-dot--done {
  border-color: #22c55e;
  background: #22c55e;
}

.timeline-dot--running {
  border-color: #818cf8;
  background: #818cf8;
  animation: pulse 2s infinite;
}

.timeline-dot--failed {
  border-color: #ef4444;
  background: #ef4444;
}

.timeline-dot--pending {
  border-color: #6b7280;
  background: transparent;
}

.timeline-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 10px 14px;
}

.timeline-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.timeline-agent {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #818cf8;
}

.timeline-agent--ci-scout { color: #f59e0b; }
.timeline-agent--sceptic { color: #ef4444; }
.timeline-agent--captain { color: #818cf8; }

.timeline-time {
  font-size: 0.7rem;
  color: #6b7280;
  margin-left: auto;
}

.timeline-content {
  font-size: 0.85rem;
  line-height: 1.5;
  color: #d1d5db;
}

.timeline-content pre {
  background: #080810;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 6px;
  padding: 8px 10px;
  overflow-x: auto;
  font-size: 0.8rem;
  margin: 6px 0;
}

.timeline-content code:not(pre code) {
  background: rgba(255, 255, 255, 0.07);
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 0.82em;
}

/* Approval flow button */
.timeline-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.15s, transform 0.1s;
}

.timeline-action-btn:active {
  transform: scale(0.97);
}

.timeline-action-btn--create-mr {
  background: #22c55e;
  color: #fff;
}

.timeline-action-btn--create-mr:hover {
  background: #16a34a;
}

.timeline-action-btn--create-mr:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Diff preview */
.timeline-diff {
  background: #080810;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  padding: 10px;
  margin: 8px 0;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.78rem;
  line-height: 1.6;
  overflow-x: auto;
  white-space: pre;
}

.timeline-diff .diff-add {
  color: #22c55e;
  background: rgba(34, 197, 94, 0.08);
  display: block;
}

.timeline-diff .diff-del {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
  display: block;
}

.timeline-diff .diff-header {
  color: #818cf8;
  display: block;
}
