/* ============================================================
   RELATIONSHIP MAP -- network.css
   All classes prefixed nm- to avoid conflicts with li-
   ============================================================ */

.nm-wrap {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px; margin-bottom: 24px;
}
.nm-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.nm-title { font-size: 16px; font-weight: 700; }
.nm-sub { display: block; font-size: 12px; font-weight: 400; color: var(--text-muted); margin-top: 3px; }
.nm-toggle {
  background: transparent; border: 1px solid var(--border-light); color: var(--text-secondary);
  border-radius: 999px; padding: 5px 12px; font-size: 12px; cursor: pointer; white-space: nowrap;
}
.nm-toggle:hover { background: var(--bg-hover); color: var(--text-primary); }
.nm-collapsed { padding-bottom: 14px; }
.nm-empty { font-size: 13px; color: var(--text-muted); padding: 18px 2px 6px; }

.nm-canvas { margin-top: 6px; }
.nm-svg { width: 100%; height: auto; max-height: 470px; display: block; }

.nm-coldring { fill: none; stroke: var(--border); stroke-width: 1; stroke-dasharray: 3 6; }
.nm-coldlabel { fill: var(--text-muted); font-size: 11px; text-anchor: middle; }
.nm-hub { fill: var(--accent); }
.nm-hublabel { fill: #fff; font-size: 13px; font-weight: 700; text-anchor: middle; }
.nm-hubsub { fill: rgba(255,255,255,0.85); font-size: 9px; text-anchor: middle; }
.nm-spoke { opacity: 0.35; }
.nm-spoke-on { opacity: 1; }

.nm-node { cursor: pointer; }
.nm-node circle { transition: r 0.12s ease; }
.nm-node:hover circle { stroke: #fff; stroke-width: 2; }
.nm-node-on circle { stroke: #fff; stroke-width: 2.5; }
.nm-nodecount { fill: #fff; font-size: 10px; font-weight: 700; text-anchor: middle; pointer-events: none; }
.nm-nodelabel { fill: var(--text-secondary); font-size: 10px; text-anchor: middle; pointer-events: none; }
.nm-node-on .nm-nodelabel { fill: var(--text-primary); font-weight: 600; }

.nm-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 4px; font-size: 11px; color: var(--text-secondary); }
.nm-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.nm-legend-item i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.nm-legend-hint { color: var(--text-muted); margin-left: auto; }

/* --- The panel. This is the part that actually gets an email sent. --- */
.nm-panel {
  margin-top: 14px; padding: 14px 16px; background: var(--bg-secondary);
  border: 1px solid var(--border); border-radius: var(--radius);
}
.nm-panel-idle { color: var(--text-muted); font-size: 12px; text-align: center; padding: 12px; }
.nm-panel-head { display: flex; align-items: center; gap: 9px; font-size: 15px; }
.nm-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.nm-panel-kind { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.nm-close { margin-left: auto; background: none; border: none; color: var(--text-muted); font-size: 20px; line-height: 1; cursor: pointer; }
.nm-close:hover { color: var(--text-primary); }

.nm-flag {
  margin-top: 10px; padding: 8px 10px; font-size: 12px;
  background: var(--accent-light); border-left: 3px solid var(--accent); border-radius: 4px;
}
.nm-sec {
  margin-top: 14px; margin-bottom: 6px; font-size: 11px; font-weight: 700;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px;
}
.nm-people, .nm-leads { list-style: none; padding: 0; margin: 0; }
.nm-people li, .nm-leads li {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 13px;
}
.nm-people li:last-child, .nm-leads li:last-child { border-bottom: none; }
.nm-people a { color: var(--blue); text-decoration: none; }
.nm-people a:hover { text-decoration: underline; }
.nm-ptitle { color: var(--text-secondary); font-size: 12px; }
.nm-psince { color: var(--text-muted); font-size: 11px; margin-left: auto; white-space: nowrap; }
.nm-more { color: var(--text-muted); font-size: 12px; }

.nm-leadbtn {
  background: none; border: none; padding: 0; cursor: pointer;
  color: var(--accent); font-size: 13px; font-weight: 600; text-align: left;
}
.nm-leadbtn:hover { text-decoration: underline; }
.nm-score {
  margin-left: auto; font-size: 11px; font-weight: 700; padding: 2px 8px;
  border-radius: 999px; background: var(--bg-hover); color: var(--text-secondary);
}
.nm-tier-hot { background: rgba(239,68,68,0.15); color: #ef4444; }
.nm-tier-warm { background: rgba(245,158,11,0.15); color: #f59e0b; }

@media (max-width: 700px) {
  .nm-legend-hint { display: none; }
  .nm-psince { margin-left: 0; }
}

/* The queue pill lives in the li- namespace (it sits in the li-filters row) but
   is styled here so the whole relationship feature is in one file. Blue to match
   the connection nodes on the map, distinct from the amber alert pills. */
.li-pill-network { border-color: #93c5fd; background: #eff6ff; color: #1d4ed8; }
.li-pill-network:hover { background: #dbeafe; border-color: #60a5fa; color: #1e40af; }
.li-pill-network.active { background: #2563eb; border-color: #2563eb; color: #fff; }
