/*
 * v2 DetectionCandidate registry (B8 phase 2).
 *
 * Replaces the legacy candidate-grid contents with a unified list
 * of swarm-shared candidates. Per-candidate expansion reveals its
 * sightings with self / remote markers.
 */

.candidate-registry-view {
  font-family: monospace;
  font-size: 12px;
  color: #d8e7d9;
  display: flex;
  flex-direction: column;
  gap: 8px;
  /* Fill the candidate-panel slot rather than leak past the
   * panel-header. Operator-resizable splits depend on this
   * chain to actually re-flow the inner list when the panel
   * shrinks. */
  flex: 1 1 0;
  min-height: 0;
  padding: 6px 8px;
}

/* Only the list scrolls — the header stays pinned so the
 * EtiCandidate / Suspicious tallies are always visible. */
.candidate-registry-view .cr-list {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.candidate-registry-view .cr-header {
  flex: 0 0 auto;
}

.cr-header {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-bottom: 6px;
  border-bottom: 1px solid #1a261a;
}

.cr-promoted {
  color: #ffe069;
}
.cr-suspicious {
  color: #8fa193;
}

/* In-card detail block (consolidated EVENT DETAIL).
 * Lives below the sightings list, only meaningful when an
 * Observation has been fetched for one of the sightings. */
.cr-card-detail {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed #1a261a;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cr-detail-hint {
  color: #6fe3a3;
  opacity: 0.45;
  font-style: italic;
  font-size: 11px;
}
.cr-detail-row {
  display: flex;
  gap: 8px;
  font-size: 11px;
}
.cr-detail-label {
  color: #7f8b99;
  flex: 0 0 70px;
}
.cr-detail-value {
  color: #d8e7d9;
  flex: 1;
}

.cr-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cr-card {
  background: #0a0a10;
  border: 1px solid #1a261a;
  border-radius: 4px;
  padding: 6px 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cr-card:hover {
  background: #0d141a;
}

.cr-card--eti {
  border-color: #6b5a1c;
}

.cr-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cr-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 2px;
  background: #1a261a;
  color: #8fa193;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 0.04em;
}

.cr-badge--eti {
  background: #6b5a1c;
  color: #ffe069;
}

.cr-badge--suspicious {
  background: #25341d;
  color: #d8e7d9;
}

.cr-id {
  color: #d8e7d9;
}

.cr-freq {
  color: #6fe3a3;
}

.cr-spacer {
  flex: 1;
}

.cr-chevron {
  color: #7f8b99;
  font-size: 10px;
}

.cr-card-meta {
  display: flex;
  gap: 16px;
  color: #7f8b99;
  font-size: 11px;
}

.cr-card-body {
  display: none;
  padding-top: 6px;
  margin-top: 4px;
  border-top: 1px solid #1a261a;
  flex-direction: column;
  gap: 2px;
}

.cr-card--open .cr-card-body {
  display: flex;
}

.cr-sighting {
  display: grid;
  grid-template-columns: 20px 140px 90px 80px 60px 1fr;
  gap: 6px;
  align-items: baseline;
  font-size: 11px;
}

.cr-sighting-marker {
  font-size: 12px;
}

.cr-sighting-time {
  color: #d8e7d9;
}

.cr-sighting-who {
  color: #6fe3a3;
}

.cr-sighting-metric {
  color: #7f8b99;
}

.cr-empty {
  color: #7f8b99;
  font-style: italic;
}
