/* ── Header bar above diagram ─────────────────────────────────────────────── */

.header {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-bottom: 1px solid var(--border);
  background: var(--bg-raised);
  flex-shrink: 0;
}

/* ── Exchange info row ────────────────────────────────────────────────────── */

.info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.separator {
  width: 1px;
  height: 14px;
  background: var(--border);
  flex-shrink: 0;
}

.route {
  font-weight: 600;
  color: var(--text-primary);
}

.app {
  color: var(--text-muted);
}

.icon {
  color: var(--text-muted);
  flex-shrink: 0;
}

.iconLive {
  color: var(--success);
  flex-shrink: 0;
}

.iconStale {
  color: var(--warning);
  flex-shrink: 0;
}

.iconDead {
  color: var(--error);
  flex-shrink: 0;
}

.linkBtn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: none;
  border: none;
  padding: 2px 4px;
  margin: -2px 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font: inherit;
  font-size: 0.75rem;
  transition: background 0.1s, color 0.1s;
}

.linkBtn:hover {
  background: var(--bg-hover);
}

.linkBtn:hover .icon {
  color: var(--amber);
}

.agentLabel {
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.duration {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* ── Correlation chain row ────────────────────────────────────────────────── */

.chain {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0.375rem 0.75rem;
  overflow-x: auto;
}

.chainLabel {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-right: 0.5rem;
  flex-shrink: 0;
}

.chainTotal {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-left: auto;
  flex-shrink: 0;
}

.chainEntry {
  display: inline-flex;
  align-items: center;
}

.chainArrow {
  color: var(--text-faint, var(--text-muted));
  font-size: 12px;
  margin: 0 4px;
  flex-shrink: 0;
}

.chainNode {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  font-size: 12px;
  font-family: var(--font-mono);
  cursor: pointer;
  background: var(--bg-surface);
  color: var(--text-secondary);
  transition: all 0.12s;
  white-space: nowrap;
}

.chainNode:hover {
  border-color: var(--text-faint);
  background: var(--bg-hover);
}

.chainNodeCurrent {
  background: var(--amber-bg);
  border-color: var(--amber-light);
  color: var(--amber-deep);
  font-weight: 600;
  cursor: default;
}

.chainNodeSuccess {
  border-left: 3px solid var(--success);
}

.chainNodeError {
  border-left: 3px solid var(--error);
}

.chainNodeRunning {
  border-left: 3px solid var(--running);
}

.chainNodeWarning {
  border-left: 3px solid var(--warning);
}

.chainRoute {
  font-weight: 500;
}

.replayIcon {
  color: var(--amber);
  flex-shrink: 0;
}

.chainDuration {
  color: var(--text-muted);
  font-size: 9px;
}

.chainNone {
  color: var(--text-muted);
  font-size: 12px;
  font-style: italic;
}
