/* NVM Polo Dealer Map: everything is scoped under .nvm-pdm and inherits the theme's fonts. */
.nvm-pdm {
	--nvm-pdm-ink: #1f1f1f;
	--nvm-pdm-text: #333;
	--nvm-pdm-muted: #6b6b6b;
	--nvm-pdm-line: #e3e3e3;
	--nvm-pdm-soft: #f5f5f5;
	--nvm-pdm-height: 560px;
	font: inherit;
	color: var(--nvm-pdm-text);
	max-width: 1140px;
	margin: 0 auto 2em;
}

.nvm-pdm *,
.nvm-pdm *::before,
.nvm-pdm *::after {
	box-sizing: border-box;
}

.nvm-pdm button,
.nvm-pdm input {
	font: inherit;
}

/* Search */
.nvm-pdm__search label {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.nvm-pdm__search {
	margin: 0 0 20px;
}

.nvm-pdm__controls {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.nvm-pdm__controls input[type="search"] {
	flex: 1 1 16em;
	min-width: 0;
	height: 44px;
	margin: 0;
	padding: 0 14px;
	border: 1px solid var(--nvm-pdm-line);
	border-radius: 4px;
	background: #fff;
	box-shadow: none;
	color: var(--nvm-pdm-ink);
}

.nvm-pdm__controls input[type="search"]:focus {
	border-color: var(--nvm-pdm-ink);
	outline: none;
}

.nvm-pdm__submit,
.nvm-pdm__near {
	flex: 0 0 auto;
	height: 44px;
	margin: 0;
	padding: 0 20px;
	border: 1px solid var(--nvm-pdm-ink);
	border-radius: 4px;
	background: var(--nvm-pdm-ink);
	color: #fff;
	line-height: 1;
	cursor: pointer;
}

.nvm-pdm__near {
	background: #fff;
	color: var(--nvm-pdm-ink);
}

.nvm-pdm__submit:hover,
.nvm-pdm__submit:focus-visible {
	background: #000;
}

.nvm-pdm__near:hover,
.nvm-pdm__near:focus-visible {
	background: var(--nvm-pdm-soft);
}

/* Full-width map; the status line sits between the search and the map. */
.nvm-pdm__status {
	margin: -8px 0 12px;
	color: var(--nvm-pdm-muted);
	font-size: 14px;
}

.nvm-pdm__status:empty {
	display: none;
}

.nvm-pdm__map {
	width: 100%;
	height: var(--nvm-pdm-height);
	border: 1px solid var(--nvm-pdm-line);
	border-radius: 4px;
	z-index: 0;
}

/* Nearest shops after a search: a grid of cards under the map. */
.nvm-pdm__results {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 0 24px;
	margin: 16px 0 0;
	padding: 0;
	list-style: none;
}

.nvm-pdm__results[hidden] {
	display: none;
}

/* Brands under the map, each opening onto its shops. */
.nvm-pdm__brands {
	margin: 40px 0 0;
}

.nvm-pdm__brands-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px 24px;
	margin: 0 0 8px;
}

.nvm-pdm .nvm-pdm__brands-title {
	margin: 0;
	color: var(--nvm-pdm-ink);
	font-size: 24px;
	line-height: 1.25;
}

.nvm-pdm__legend-multi {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--nvm-pdm-muted);
	font-size: 13px;
	white-space: nowrap;
}

.nvm-pdm__swatch {
	display: inline-block;
	flex: 0 0 auto;
	width: 9px;
	height: 9px;
	border-radius: 50%;
}

.nvm-pdm__brand {
	border-bottom: 1px solid var(--nvm-pdm-line);
}

.nvm-pdm__brand summary {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 0;
	color: var(--nvm-pdm-ink);
	cursor: pointer;
	list-style: none;
}

.nvm-pdm__brand summary::-webkit-details-marker {
	display: none;
}

.nvm-pdm__brand summary::after {
	content: "+";
	flex: 0 0 auto;
	width: 20px;
	font-size: 22px;
	line-height: 1;
	text-align: center;
}

.nvm-pdm__brand[open] summary::after {
	content: "\2212";
}

.nvm-pdm__brand summary:focus-visible {
	outline: 2px solid var(--nvm-pdm-ink);
	outline-offset: 2px;
}

.nvm-pdm__brand-mark {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 4px;
	min-width: 22px;
}

.nvm-pdm__brand-name {
	flex: 1 1 auto;
	font-size: 17px;
	font-weight: 700;
}

.nvm-pdm__count {
	flex: 0 0 auto;
	min-width: 28px;
	padding: 2px 8px;
	border-radius: 999px;
	background: var(--nvm-pdm-soft);
	color: var(--nvm-pdm-muted);
	font-size: 13px;
	text-align: center;
}

.nvm-pdm__brand-shops {
	columns: 3 240px;
	column-gap: 40px;
	margin: 0 0 20px;
	padding: 4px 0 0 34px;
	list-style: none;
}

.nvm-pdm__town {
	margin: 0 0 18px;
	break-inside: avoid;
}

.nvm-pdm .nvm-pdm__town-name {
	margin: 0 0 4px;
	padding: 0 0 4px;
	border-bottom: 1px solid var(--nvm-pdm-line);
	color: var(--nvm-pdm-muted);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.nvm-pdm__town-shops {
	margin: 0;
	padding: 0;
	list-style: none;
}

.nvm-pdm li.nvm-pdm__shop--compact {
	padding: 8px 8px 8px 0;
	border-bottom: 0;
	font-size: 13px;
	line-height: 1.4;
}

.nvm-pdm__shop--compact .nvm-pdm__name {
	font-size: 14px;
}

.nvm-pdm .nvm-pdm__shop--compact .nvm-pdm__actions {
	margin-top: 2px;
	font-size: 12px;
}

@media (max-width: 600px) {
	.nvm-pdm__brand-shops {
		padding-left: 0;
	}
}

.nvm-pdm__shop {
	margin: 0;
	padding: 14px 18px;
	border-bottom: 1px solid var(--nvm-pdm-line);
	font-size: 14px;
	line-height: 1.45;
}

li.nvm-pdm__shop {
	position: relative;
	padding: 14px 12px;
}

li.nvm-pdm__shop:hover,
li.nvm-pdm__shop.is-active {
	background: var(--nvm-pdm-soft);
}

.nvm-pdm__shop p {
	margin: 2px 0 0;
}

.nvm-pdm__name {
	margin: 0;
	color: var(--nvm-pdm-ink);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
}

/* The whole list row focuses the shop on the map; the action links sit above that hit area. */
.nvm-pdm__focus {
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font-weight: inherit;
	text-align: left;
	cursor: pointer;
}

.nvm-pdm__focus::after {
	content: "";
	position: absolute;
	inset: 0;
}

.nvm-pdm__focus:focus-visible {
	outline: 2px solid var(--nvm-pdm-ink);
	outline-offset: 2px;
}

.nvm-pdm__shop-brands {
	color: var(--nvm-pdm-muted);
	font-size: 12px;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.nvm-pdm__km {
	color: var(--nvm-pdm-ink);
	font-weight: 700;
}

.nvm-pdm .nvm-pdm__actions {
	position: relative;
	z-index: 1;
	display: flex;
	flex-wrap: wrap;
	gap: 2px 14px;
	margin-top: 6px;
}

.nvm-pdm__actions a {
	color: var(--nvm-pdm-ink);
	font-size: 13px;
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.nvm-pdm__actions a:hover {
	text-decoration: none;
}

/* Map: keep the theme's img/link styles away from Leaflet's tiles and controls. */
.nvm-pdm .leaflet-container {
	font: inherit;
}

.nvm-pdm .leaflet-container img,
.nvm-pdm .leaflet-container svg {
	max-width: none !important;
	max-height: none !important;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	transition: none;
}

/*
 * Tiles land on fractional pixels when the page centres the map: overlap them by half a pixel to hide the seams.
 * Leaflet's plus-lighter blending would add the overlap up into white lines, so blend normally.
 */
.nvm-pdm .leaflet-container img.leaflet-tile {
	width: 256.5px !important;
	height: 256.5px !important;
	mix-blend-mode: normal;
}

.nvm-pdm .leaflet-bar a {
	color: var(--nvm-pdm-ink);
	font-family: Arial, Helvetica, sans-serif;
	font-weight: 400;
	text-decoration: none;
}

.nvm-pdm .leaflet-control-attribution {
	font-size: 11px;
}

.nvm-pdm .leaflet-control-attribution a {
	text-decoration: none;
}

.nvm-pdm .nvm-pdm__pin {
	background: none;
	border: 0;
}

.nvm-pdm .nvm-pdm__pin svg {
	display: block;
	filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

/* Favicon in the pin head and the brand filter: shown whole, never cropped or recoloured.
   The resets stop theme img rules (radius, borders, transitions) from changing it. */
.nvm-pdm .nvm-pdm__pin-body {
	position: relative;
	display: block;
	width: 34px;
	height: 46px;
}

.nvm-pdm img.nvm-pdm__pin-favicon,
.nvm-pdm img.nvm-pdm__favicon {
	display: block;
	max-width: none;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 2px;
	box-shadow: none;
	object-fit: contain;
	transition: none;
}

.nvm-pdm img.nvm-pdm__pin-favicon {
	position: absolute;
	top: 7.5px;
	left: 8px;
	width: 18px;
	height: 18px;
}

/* White tile, as in a browser tab. */
.nvm-pdm img.nvm-pdm__favicon {
	flex: none;
	box-sizing: content-box;
	width: 18px;
	height: 18px;
	padding: 2px;
	border-radius: 4px;
	background: #fff;
}

.nvm-pdm img.nvm-pdm__favicon + img.nvm-pdm__favicon {
	margin-left: -3px;
}

.nvm-pdm .nvm-pdm__cluster {
	display: flex;
	align-items: center;
	justify-content: center;
	border: 3px solid rgba(255, 255, 255, 0.9);
	border-radius: 50%;
	background: var(--nvm-pdm-ink);
	box-shadow: 0 0 0 4px rgba(31, 31, 31, 0.2);
	color: #fff;
	font: 700 13px/1 Arial, Helvetica, sans-serif;
}

.nvm-pdm .leaflet-popup-content-wrapper {
	border-radius: 4px;
}

.nvm-pdm .leaflet-popup-content {
	max-height: 260px;
	margin: 4px 14px;
	overflow-y: auto;
	font: inherit;
}

.nvm-pdm__popup .nvm-pdm__shop {
	padding: 10px 0;
}

.nvm-pdm__popup .nvm-pdm__shop:last-child {
	border-bottom: 0;
}

.nvm-pdm .nvm-pdm__point {
	fill: #1a73e8;
	fill-opacity: 1;
	stroke: #fff;
	stroke-width: 3;
}

.nvm-pdm__noscript h3 {
	margin: 1em 0 0.25em;
}

@media (max-width: 900px) {
	.nvm-pdm__map {
		height: min(var(--nvm-pdm-height), 60vh);
	}
}

@media (max-width: 600px) {
	.nvm-pdm__submit,
	.nvm-pdm__near {
		flex: 1 1 auto;
	}
}

.nvm-pdm__shop--compact .nvm-pdm__actions a {
	font-size: 12px;
}
