/* Neuron dialog (graph node clicks, Neurons list titles): content + related tabs. */

@media (min-width: 768px) { .neuron-dialog .modal-xl { max-width: min(1100px, calc(100vw - 32px)); } }
.neuron-dialog .modal-header { gap: var(--sp-3); align-items: center; }
.nd-head { display: flex; align-items: center; gap: var(--sp-3); flex: 1; min-width: 0; }
.nd-head .modal-title { min-width: 0; }
.nd-name-input { flex: 1; min-width: 0; font-size: var(--fs-lg); font-weight: 700; }

.nd-tabs { display: flex; gap: 2px; padding: 0 var(--sp-5); border-bottom: 1px solid var(--border); margin: 0; list-style: none; }
.nd-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 12px; margin-bottom: -1px;
  background: none; border: 0; border-bottom: 2px solid transparent;
  color: var(--muted); font: inherit; font-size: 13.5px; cursor: pointer;
}
.nd-tab:hover { color: var(--text); }
.nd-tab[aria-selected="true"] { color: var(--text); font-weight: 600; border-bottom-color: var(--ember-500); }
.nd-tab .count { font-size: 11px; background: var(--chip); padding: 0 6px; border-radius: var(--r-pill); color: var(--text-2); }

.neuron-dialog .modal-body { min-height: min(60vh, 560px); }
.nd-view { overflow-wrap: anywhere; }

.nd-toolbar {
  position: sticky; top: calc(-1 * var(--sp-5)); z-index: 2;
  display: flex; flex-wrap: wrap; align-items: center; gap: 2px;
  margin: calc(-1 * var(--sp-5)) calc(-1 * var(--sp-5)) var(--sp-3);
  padding: var(--sp-2) var(--sp-5);
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.nd-toolbar[hidden] { display: none; }
.nd-toolbar .icon-btn { width: 32px; height: 32px; background: transparent; border-color: transparent; }
.nd-toolbar .icon-btn:hover:not(:disabled) { background: var(--surface-2); border-color: var(--border); }
.nd-toolbar .icon-btn:disabled { opacity: 0.4; cursor: default; }
.nd-toolbar .nd-sep { width: 1px; height: 20px; background: var(--border); margin: 0 4px; }
.nd-toolbar .spacer { flex: 1; }
.nd-toolbar [data-nd-source][aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-text); }

.nd-editor, .nd-source {
  min-height: 40vh; width: 100%;
  padding: var(--sp-4); border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--surface); color: var(--text);
}
.nd-editor:focus, .nd-source:focus { outline: none; border-color: var(--ember-500); box-shadow: 0 0 0 3px var(--accent-soft); }
.nd-source { font-family: var(--mono); font-size: var(--fs-sm); line-height: 1.6; resize: vertical; }

.nd-related-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.nd-related-list .rel-dir { font-family: var(--mono); color: var(--muted); width: 1.2em; text-align: center; flex: none; }

@media (max-width: 640px) {
  .nd-tabs { padding: 0 var(--sp-3); }
  .nd-tab { padding: 10px 8px; }
}

.nd-note { display: flex; gap: var(--sp-2); align-items: flex-start; margin: 0 0 var(--sp-3); padding: var(--sp-2) var(--sp-3); background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md); }
.nd-note[hidden] { display: none; }
