/**
 * The Philatelic Map of India (/map/): marker shapes, the cluster bubble,
 * the list of kinds and the popups. Built on ppc-map.css (the map box,
 * popups and result rows) so it looks like the site's other maps.
 *
 * Colours come from Philatelist → Map (includes/content/map-colours.php);
 * each kind's pin has its own white symbol, so two kinds never look the
 * same whatever their colours.
 *
 * @package ThePhilatelist
 * @since 0.33.0
 */

/* The map: tall beside the list on a wide screen, most of the screen on a phone. */
.philatelist-pmap-canvas {
	height: min(72vh, 720px);
	min-height: 460px;
}

@media (max-width: 1023px) {
	.philatelist-pmap-canvas {
		height: 62vh;
		min-height: 360px;
	}
}

/* Wide screens: as tall as the cards beside it (the column stretches; the map fills it). */
@media (min-width: 1024px) {
	.philatelist-pmap-canvas {
		flex: 1 1 auto;
		height: auto;
		min-height: 560px;
	}
}

/* The pins themselves are shared by every map: philatelist_map_pin_css() in map-colours.php. */

/* A kind's badge (the pin without its point) in the list of kinds and the nearest list. */
.philatelist-pmap-badge {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 30px;
	filter: drop-shadow(0 1px 1.5px rgba(27, 22, 17, 0.35));
}

.philatelist-pmap-badge svg {
	display: block;
	width: 26px;
	height: 26px;
}

/* The list of kinds: big rows, the whole row ticks the box. */
.philatelist-pmap-layers {
	margin: 0;
	padding: 0;
	list-style: none;
}

.philatelist-pmap-layer {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 56px;
	padding: 8px 12px;
	border-top: 1px solid var(--color-line);
	cursor: pointer;
}

.philatelist-pmap-layers li:first-child .philatelist-pmap-layer {
	border-top: 0;
}

.philatelist-pmap-layer:hover {
	background: var(--color-sand);
}

.philatelist-pmap-layer input {
	flex: none;
	width: 22px;
	height: 22px;
	margin: 0;
	accent-color: var(--color-brand);
	cursor: pointer;
}

.philatelist-pmap-layer__text {
	display: flex;
	flex: 1;
	min-width: 0;
	flex-direction: column;
}

.philatelist-pmap-layer__name {
	color: var(--color-ink-900);
	font-size: 15.5px;
	font-weight: 600;
	line-height: 1.3;
}

.philatelist-pmap-layer__count {
	color: var(--color-ink-400);
	font-weight: 500;
}

.philatelist-pmap-layer__hint {
	color: var(--color-ink-500);
	font-size: 13.5px;
	line-height: 1.35;
}

.philatelist-pmap-layer.is-loading .philatelist-pmap-layer__count::after {
	content: " · …";
}

/* Popups: a strip in the kind's colour along the top says what it is, without a marker in the text. */
.philatelist-pmap-wrap .leaflet-popup-content-wrapper {
	border-top: 6px solid var(--pmap-strip, var(--color-line));
}

.philatelist-pmap-wrap a.leaflet-popup-close-button {
	top: 8px;
	right: 4px;
}

.philatelist-pmap-wrap.is-bureau { --pmap-strip: var(--map-bureau, #6b2148); }
.philatelist-pmap-wrap.is-counter { --pmap-strip: var(--map-counter, #2c6e7f); }
.philatelist-pmap-wrap.is-ppc { --pmap-strip: var(--map-ppc, #d0434f); }
.philatelist-pmap-wrap.is-event { --pmap-strip: var(--map-event, #2f6fd6); }
.philatelist-pmap-wrap.is-collector { --pmap-strip: var(--map-collector, #3f3a45); }
.philatelist-pmap-wrap.is-club { --pmap-strip: var(--map-club, #2f7d4f); }
.philatelist-pmap-wrap.is-dealer { --pmap-strip: var(--map-dealer, #b7791f); }

.philatelist-pmap-popup {
	flex-direction: column;
	gap: 8px;
}

.philatelist-pmap-popup img.philatelist-pmap-img {
	width: 100%;
	height: 120px;
	object-fit: contain;
	background: var(--color-sand);
}

.philatelist-pmap-kind {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0 0 3px !important;
	color: var(--color-ink-500);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.philatelist-pmap-what {
	color: var(--color-ink-500);
}

.philatelist-pmap-source {
	margin-top: 6px !important;
	color: var(--color-ink-400);
	font-size: 12px;
}

.philatelist-pmap-member {
	display: flex;
	gap: 10px;
	align-items: center;
}

.philatelist-pmap-avatar {
	position: relative;
	flex: none;
	width: 48px;
	height: 48px;
}

.philatelist-pmap-avatar img {
	position: absolute;
	inset: 0;
	background: var(--color-surface);
}

.philatelist-pmap-member img,
.philatelist-pmap-initial {
	flex: none;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	object-fit: cover;
}

.philatelist-pmap-initial {
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-size: 20px;
	font-weight: 700;
}

.philatelist-pmap-empty {
	padding: 14px 16px;
	color: var(--color-ink-500);
	font-size: 14.5px;
}
