/* ═══════════════════════════════════════════════════════════════
   Sherlock – Track-Tab (Tab 6: Karte / SVG-Track)
   ═══════════════════════════════════════════════════════════════ */

/* ── Container ─────────────────────────────────────────────────── */

.track-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  background: var(--bg-surface);
}

/* ── Toolbar ────────────────────────────────────────────────────── */

.track-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  flex-shrink: 0;
  gap: 12px;
  flex-wrap: wrap;
}

.track-toolbar-left,
.track-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.track-toolbar-label {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.track-select {
  font-size: 12px;
  padding: 3px 6px;
  border: 1px solid var(--border-default);
  border-radius: 3px;
  background: var(--bg-surface);
  color: var(--text-primary);
  cursor: pointer;
  max-width: 200px;
}

.track-select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* ── Zoom reset button ──────────────────────────────────────────── */

.track-zoom-reset-btn {
  font-size: 12px;
  padding: 3px 8px;
  border: 1px solid var(--border-default);
  border-radius: 3px;
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.1s, color 0.1s;
}

.track-zoom-reset-btn:not(:disabled):hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.track-zoom-reset-btn:disabled {
  opacity: 0.38;
  cursor: default;
}

/* ── Legend ─────────────────────────────────────────────────────── */

.track-legend {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.track-legend-label {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

.track-legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.track-legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}

.track-legend-sep {
  width: 1px;
  height: 14px;
  background: var(--border-subtle);
  flex-shrink: 0;
}

.track-legend-dash {
  width: 20px;
  height: 0;
  border-top: 2px dashed #ef4444;
  flex-shrink: 0;
  display: inline-block;
}

/* ── SVG wrapper ────────────────────────────────────────────────── */

.track-svg-wrap {
  flex: 1 1 0;
  min-height: 200px;
  overflow: hidden;
  background: var(--bg-elevated);
  position: relative;
}

.track-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ── Interactive points & SVG canvas ────────────────────────────── */

.track-svg {
  cursor: grab;
}

.track-svg:active {
  cursor: grabbing;
}

.track-point {
  cursor: pointer;
}

.track-point:hover {
  filter: brightness(1.18) drop-shadow(0 0 3px currentColor);
}

/* ── Info bar ───────────────────────────────────────────────────── */

.track-info {
  padding: 5px 14px;
  font-size: 11px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
  flex-shrink: 0;
  background: var(--bg-surface);
}

/* ── Empty state ────────────────────────────────────────────────── */

.track-empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 200px;
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
  padding: 32px;
}
