/* group map 共用樣式.css */
.mapLegend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 220px;
  max-width: min(320px, calc(100% - 140px));
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--card) 94%, transparent);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.10);
  backdrop-filter: blur(10px);
  pointer-events: auto;
}

.mapLegendTitle {
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
}

.mapLegendItem {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.legendDot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  flex: 0 0 12px;
  border: 2px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.38);
}

.legendLight {
  background: #f97316;
}

.legendCam {
  background: #2563eb;
}

.legendSelected {
  background: #22c55e;
}

.mapResetBtn {
  flex: 0 0 auto;
  pointer-events: auto;
  background: color-mix(in srgb, var(--card) 94%, transparent);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.10);
}

.mapEmptyState {
  position: absolute;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  font-size: 15px;
  font-weight: 800;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(2px);
}

html.dark .mapLegend,
html.dark .mapResetBtn {
  background: color-mix(in srgb, var(--card) 88%, transparent);
}

html.dark .mapEmptyState {
  background: rgba(15, 23, 42, 0.68);
}

@media (max-width: 768px) {
  .mapLegend {
    min-width: 0;
    max-width: 100%;
  }

  .mapResetBtn {
    align-self: flex-start;
  }
}