.container {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 300px;
  overflow: hidden;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.svg {
  width: 100%;
  height: 100%;
  display: block;
  -webkit-user-select: none;
  user-select: none;
  outline: none;
}

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 300px;
  color: var(--text-muted);
  font-size: 14px;
}

.error {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 300px;
  color: var(--error);
  font-size: 14px;
}

.zoomControls {
  position: absolute;
  bottom: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px;
  box-shadow: var(--shadow-md);
}

.zoomBtn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 16px;
  cursor: pointer;
  border-radius: var(--radius-sm);
}

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

.zoomLevel {
  font-size: 12px;
  color: var(--text-muted);
  min-width: 36px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.breadcrumbs {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  align-items: center;
  padding: 4px 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  z-index: 10;
  font-size: 12px;
}

.breadcrumbItem {
  display: flex;
  align-items: center;
}

.breadcrumbSep {
  margin: 0 6px;
  color: var(--text-muted);
}

.breadcrumbLink {
  background: none;
  border: none;
  color: var(--running);
  cursor: pointer;
  padding: 0;
  font-size: 12px;
  font-family: inherit;
}

.breadcrumbLink:hover {
  text-decoration: underline;
}

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

.minimap {
  position: absolute;
  bottom: 52px;
  right: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  z-index: 5;
}

.nodeToolbar {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px 4px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  transform: translate(-50%, -100%);
  margin-top: -6px;
  z-index: 10;
  pointer-events: auto;
}

.nodeToolbarBtn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  padding: 0;
}

.nodeToolbarBtn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

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

/* Heatmap tooltip — HTML overlay below hovered node */
.heatmapTooltip {
  position: absolute;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 8px 12px;
  transform: translate(-50%, 8px);
  z-index: 10;
  pointer-events: none;
  white-space: nowrap;
  font-size: 12px;
}

.heatmapTooltipTitle {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border-subtle);
}

.heatmapTooltipGrid {
  display: grid;
  grid-template-columns: auto auto;
  gap: 2px 12px;
}

.heatmapTooltipLabel {
  font-size: 11px;
  color: var(--text-muted);
}

.heatmapTooltipValue {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: right;
}

.iterationStepper {
  display: flex;
  align-items: center;
  gap: 2px;
  background: color-mix(in srgb, var(--bg-surface) 15%, transparent);
  border-radius: 3px;
  padding: 1px 3px;
  font-size: 12px;
  color: var(--text-primary);
  font-family: inherit;
}

.iterationStepper button {
  width: 16px;
  height: 16px;
  border: none;
  background: color-mix(in srgb, var(--bg-surface) 20%, transparent);
  color: var(--text-primary);
  border-radius: 2px;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-family: inherit;
}

.iterationStepper button:disabled {
  opacity: 0.3;
  cursor: default;
}
