.#places-map { border: 1px solid #e0e0e0; border-radius: 6px; }

/* Interactive legend control */
.map-legend {
  background: white;
  padding: 10px 12px;
  border-radius: 6px;
  box-shadow: 0 1px 5px rgba(0,0,0,0.2);
  line-height: 1.4;
  font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Roboto", "Segoe UI", "Helvetica Neue", "Lucida Grande", Arial, sans-serif;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  margin: 2px 0;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.2s ease;
  user-select: none;
}

.legend-item:hover {
  background-color: #f5f5f5;
}

.legend-item.active {
  opacity: 1;
}

.legend-item:not(.active) {
  opacity: 0.4;
  text-decoration: line-through;
}

.legend-item i {
  font-size: 14px;
  width: 14px;
  text-align: center;
}

.legend-item span {
  font-size: 0.75rem;
  font-weight: 400;
}

/* custom marker icon styles */
.leaflet-div-icon.custom-marker-icon {
  background: none !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Override all default Leaflet div icon styles */
.leaflet-div-icon {
  background: none !important;
  border: none !important;
}

.custom-marker-icon i {
  display: block;
}

/* friendly error overlay inside the map */
.map-error {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255,255,255,0.95);
	color: #333;
	padding: 1rem;
	text-align: center;
	z-index: 1000;
	font-size: 0.95rem;
	border-radius: 6px;
}

.map-error p { margin: 0 0 .5rem 0; }
.map-error button { background: #ff6105; color: white; border: none; padding: .4rem .6rem; border-radius: 4px; cursor: pointer; }

/* popup styling */
.map-popup {
  text-align: center;
}

.map-popup strong {
  font-size: 0.875rem; /* ~14px */
  font-weight: 400;
  display: block;
}

.map-popup-year {
  color: #6c757d;
  font-size: 0.75rem; /* ~12px */
  font-weight: 300;
  margin-top: 0.25rem;
}

/* Make popups use the site's global font stack */
.map-popup, .leaflet-popup-content, .leaflet-popup-content-wrapper {
	font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Roboto", "Segoe UI", "Helvetica Neue", "Lucida Grande", Arial, sans-serif;
}

/* Make attribution text much smaller */
.leaflet-control-attribution {
	font-size: 0.6rem !important;
	opacity: 0.7;
}

/* Custom cluster marker styles */
.marker-cluster div {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  border: 3px solid white;
}

.marker-cluster div span {
  line-height: 1;
}

/* Override default cluster styles */
.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
  background-clip: padding-box;
}

/* Type-specific cluster styles (colors are set inline via iconCreateFunction) */
.marker-cluster-lived div {
  opacity: 0.9;
}

.marker-cluster-visited div {
  opacity: 0.9;
}

.marker-cluster-bucket div {
  opacity: 0.9;
}
