.wcmap-wrap {
	--wcmap-border: #e2e6ea;
	--wcmap-ink: #11161d;
	--wcmap-muted: #5c6672;
	--wcmap-accent: #e0245e;
	font-family: inherit;
	position: relative;
}

/* Break out of any boxed container, edge to edge. */
.wcmap-fullwidth {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}

.wcmap-inner {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0;
	position: relative;
}

.wcmap-canvas {
	width: 100%;
	height: var(--wcmap-height, 600px);
	min-height: 300px;
	z-index: 0;
	background: #eef1f4;
}

@media (max-width: 782px) {
	.wcmap-canvas {
		height: min(var(--wcmap-height, 600px), 65vh);
	}
}

/* Country list floats over the map on desktop, stacks below on phones. */
.wcmap-has-list .wcmap-panel {
	position: absolute;
	top: 16px;
	left: 16px;
	z-index: 500;
	width: 260px;
	max-height: calc(100% - 32px);
	display: flex;
	flex-direction: column;
	background: rgba(255, 255, 255, 0.96);
	border: 1px solid var(--wcmap-border);
	border-radius: 12px;
	box-shadow: 0 6px 24px rgba(16, 24, 40, 0.12);
	overflow: hidden;
	backdrop-filter: blur(6px);
}

@media (max-width: 782px) {
	.wcmap-has-list .wcmap-panel {
		position: static;
		width: auto;
		max-height: 300px;
		border-radius: 0;
		border-left: 0;
		border-right: 0;
		box-shadow: none;
	}
}

.wcmap-panel__head {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px;
	border-bottom: 1px solid var(--wcmap-border);
}

.wcmap-filter {
	flex: 1;
	min-width: 0;
	padding: 8px 11px;
	border: 1px solid var(--wcmap-border);
	border-radius: 8px;
	font-size: 14px;
	background: #f6f8fa;
	color: var(--wcmap-ink);
}

.wcmap-filter:focus {
	outline: 2px solid var(--wcmap-accent);
	outline-offset: 1px;
	background: #fff;
}

.wcmap-total {
	flex: none;
	font-size: 12px;
	font-weight: 700;
	padding: 4px 9px;
	border-radius: 999px;
	background: var(--wcmap-accent);
	color: #fff;
}

.wcmap-list {
	list-style: none;
	margin: 0;
	padding: 0;
	overflow-y: auto;
	flex: 1;
}

.wcmap-list__item + .wcmap-list__item {
	border-top: 1px solid var(--wcmap-border);
}

.wcmap-list__btn {
	display: flex;
	align-items: center;
	gap: 9px;
	width: 100%;
	padding: 9px 12px;
	background: none;
	border: 0;
	font: inherit;
	font-size: 14px;
	text-align: left;
	color: var(--wcmap-ink);
	cursor: pointer;
}

.wcmap-list__btn:hover,
.wcmap-list__btn:focus-visible {
	background: #f2f5f9;
}

.wcmap-list__flag {
	font-size: 17px;
	line-height: 1;
}

.wcmap-list__empty {
	padding: 16px 12px;
	font-size: 14px;
	color: var(--wcmap-muted);
}

/* Pins */
.wcmap-pin {
	background: none;
	border: 0;
}

.wcmap-pin__mark svg {
	display: block;
	filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.28));
}

.wcmap-pin--labelled {
	white-space: nowrap;
}

.wcmap-pin__label {
	position: absolute;
	left: 28px;
	top: 6px;
	font-size: 12px;
	font-weight: 600;
	color: #11161d;
	background: rgba(255, 255, 255, 0.88);
	padding: 2px 6px;
	border-radius: 5px;
}

.wcmap-popup {
	text-align: center;
	min-width: 150px;
}

.wcmap-popup__flag {
	font-size: 30px;
	line-height: 1;
	display: block;
	margin-bottom: 4px;
}

.wcmap-popup__title {
	margin: 0 0 4px;
	font-size: 15px;
}

.wcmap-popup__meta {
	margin: 0;
	font-size: 13px;
	color: var(--wcmap-muted);
}

.leaflet-container {
	font: inherit;
}

/* Credit bar off: belt and braces, in case a cached tile layer adds it back. */
.wcmap-no-credit .leaflet-control-attribution {
	display: none !important;
}
