/**
 * Community collectors map — container, markers, clusters and tooltips.
 *
 * Marker shape and sizes follow the live site's map (46px round marker,
 * photo or initial on a white face, a coloured ring with a dark outline;
 * 46 / 52 / 58px cluster bubbles with the count). Colours come from the
 * theme's colour tokens (theme-src/style.css), so the markers follow the
 * active colour scheme; each var() carries the Default scheme's value as
 * a fallback for when the theme isn't active.
 *
 * Used by includes/community-map.php and assets/js/community-map.js.
 */

.philatelist-community-map__note {
	color: var(--color-ink-500);
	font-size: 0.9rem;
	margin: 0.25rem 0 0;
}

/*
 * `isolation: isolate` gives the map its own stacking context. Leaflet's
 * panes and controls carry z-index 400–1000; without this they compete
 * with the page and draw over the sticky header's account menu (z-index 50).
 */
.philatelist-community-map__canvas {
	position: relative;
	isolation: isolate;
	height: 460px;
	margin-top: 1rem;
	border: 1px solid var(--color-line);
	border-radius: 12px;
	overflow: hidden;
	background: var(--color-sand);
}

@media (max-width: 767px) {
	.philatelist-community-map__canvas {
		height: 360px;
	}
}

/* One collector: brand-coloured ring, dark outline, white face. */
.philatelist-map-pin {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	border: 3px solid var(--color-brand);
	border-radius: 50%;
	background: var(--color-surface);
	box-shadow: 0 0 0 2px var(--color-ink-900), var(--shadow-raised, 0 2px 10px rgba(27, 22, 17, 0.14));
	cursor: pointer;
}

.philatelist-map-pin__initial {
	color: var(--color-ink-900);
	font-family: var(--font-sans, sans-serif);
	font-size: 18px;
	font-weight: 700;
	line-height: 1;
}

.philatelist-map-pin.has-photo .philatelist-map-pin__initial {
	display: none;
}

.philatelist-map-pin__photo {
	position: absolute;
	inset: 2px;
	width: calc(100% - 4px);
	height: calc(100% - 4px);
	border-radius: 50%;
	object-fit: cover;
}

/* A group of collectors: brand-filled bubble with the count. */
.philatelist-map-cluster {
	display: flex;
	align-items: center;
	justify-content: center;
	border: 2px solid var(--color-ink-900);
	border-radius: 50%;
	background: var(--color-brand);
	box-shadow: var(--shadow-raised, 0 2px 10px rgba(27, 22, 17, 0.14));
	color: var(--color-primary-foreground);
	font-family: var(--font-sans, sans-serif);
	font-size: 14px;
	font-weight: 700;
}

/* Hover card: name, then "City, State". */
.leaflet-tooltip.philatelist-map-tooltip {
	padding: 8px 10px;
	border: 1px solid var(--color-line);
	border-radius: 10px;
	background: var(--color-surface);
	box-shadow: var(--shadow-raised, 0 2px 10px rgba(27, 22, 17, 0.14));
	color: var(--color-ink-600);
	font-family: var(--font-sans, sans-serif);
	font-size: 12px;
	line-height: 1.35;
}

.leaflet-tooltip.philatelist-map-tooltip strong {
	color: var(--color-ink-900);
	font-size: 13px;
}
