/* ═══════════════════════════════════════════════════
   graph.css — D3 graph canvas styles
═══════════════════════════════════════════════════ */

#graph-svg {
  width: 100%;
  height: 100%;
  cursor: crosshair;
}

.graph-mode-pill {
  position: absolute;
  top: 20px;
  left: 20px;
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--rim);
  border-radius: 999px;
  background: rgba(8, 12, 24, 0.88);
  backdrop-filter: blur(8px);
  z-index: 2;
}

.graph-mode-btn {
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  padding: 6px 12px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.graph-mode-btn.active {
  background: rgba(0, 255, 136, 0.16);
  color: var(--phosphor);
}

/* ── Controls ── */
.graph-controls {
  position: absolute;
  bottom: 20px;
  left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.graph-btn {
  width: 32px; height: 32px;
  border: 1px solid var(--rim);
  background: var(--surface);
  color: var(--muted);
  font-size: 14px;
  border-radius: 6px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
  font-family: var(--font-mono);
}
.graph-btn:hover { border-color: var(--phosphor); color: var(--phosphor); }

/* ── Legend ── */
.graph-legend {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: rgba(8,12,24,0.85);
  border: 1px solid var(--rim);
  border-radius: 8px;
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--muted);
  backdrop-filter: blur(8px);
}
.leg-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}
.leg-row:last-child { margin-bottom: 0; }
.leg-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Empty state ── */
.graph-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  pointer-events: none;
}
.graph-empty-icon { font-size: 3rem; opacity: 0.15; }
.graph-empty-text {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.1em;
}

/* ── Node labels (SVG text) ── */
.node-label {
  pointer-events: none;
  user-select: none;
}

.graph-result-card {
  padding: 10px 12px;
  border: 1px solid #243142;
  border-radius: 10px;
  background: rgba(10, 18, 32, 0.58);
  margin-top: 8px;
}

.graph-result-card code {
  color: #bfdbfe;
  font-family: var(--font-mono);
}
