.wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 12px 0;
}

/* Processor node */
.node {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  cursor: default;
  transition: all 0.12s;
  position: relative;
}

.node:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--text-faint);
}

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

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

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

.nodeBottleneck {
  border-left: 3px solid var(--error);
  background: var(--warning-bg);
  border-color: var(--warning-border);
}

/* Icon */
.icon {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}

.iconFrom {
  background: var(--running-bg);
  color: var(--running);
}

.iconProcess {
  background: var(--amber-bg);
  color: var(--amber);
}

.iconTo {
  background: var(--success-bg);
  color: var(--success);
}

.iconChoice {
  background: var(--purple-bg);
  color: var(--purple);
}

.iconErrorHandler {
  background: var(--error-bg);
  color: var(--error);
}

/* Node info */
.info {
  flex: 1;
  min-width: 0;
}

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

.label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Node stats */
.stats {
  text-align: right;
  flex-shrink: 0;
}

.duration {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
}

.durFast {
  color: var(--success);
}

.durNormal {
  color: var(--text-primary);
}

.durSlow {
  color: var(--warning);
}

.durBreach {
  color: var(--error);
}

/* Connector */
.connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 16px;
}

.connectorLine {
  width: 1px;
  flex: 1;
  background: var(--border);
}

.connectorArrow {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid var(--border);
}

/* Error handler section */
.errorSection {
  width: 100%;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}

.errorLabel {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--error);
  margin-bottom: 6px;
  padding-left: 2px;
}

/* Selected node */
.nodeSelected {
  box-shadow: 0 0 0 2px var(--amber);
  border-color: var(--amber);
}

/* Clickable node */
.nodeClickable {
  cursor: pointer;
}

.nodeClickable:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

/* Action trigger — hidden by default, shown on hover/selected */
.actionsTrigger {
  opacity: 0;
  transition: opacity 0.1s;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  margin-left: 4px;
}

.node:hover .actionsTrigger,
.actionsVisible {
  opacity: 1;
}

.actionsBtn {
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 0 4px;
  font-size: 14px;
  line-height: 1;
  color: var(--text-muted);
  transition: all 0.1s;
  font-family: var(--font-body);
}

.actionsBtn:hover {
  background: var(--bg-hover);
  border-color: var(--border-subtle);
  color: var(--text-primary);
}

/* Badges */
.badgeRow {
  position: absolute;
  top: -7px;
  right: 8px;
  display: flex;
  gap: 3px;
  pointer-events: auto;
}

.badge {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 600;
  color: #fff;
  border-radius: 8px;
  padding: 1px 6px;
  text-transform: uppercase;
  white-space: nowrap;
  letter-spacing: 0.3px;
}

.badgeInfo    { background: var(--running); }
.badgeSuccess { background: var(--success); }
.badgeWarning { background: var(--amber); }
.badgeError   { background: var(--error); }

/* Node wrapper (replaces inline style) */
.nodeWrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Multi-flow sections */
.flowSection {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.flowSectionSeparated {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}

.flowLabel {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  padding-left: 2px;
  width: 100%;
}

.flowLabelDefault { color: var(--text-muted); }
.flowLabelError   { color: var(--error); }
.flowLabelWarning { color: var(--warning); }
.flowLabelInfo    { color: var(--running); }
