/* Locations map block */
.locations-map {
	--lm-navy: #001b3f;
	--lm-blue: #2e68b2;
	--lm-light-blue: #e6edf8;
	--lm-border: #d9e1ec;
	--lm-text: #0d0e10;
	--lm-muted: #46535c;
	--lm-yellow: #ffc107;
	margin-top: 80px;
	margin-bottom: 80px;
	background: #fff;
}

.locations-map.light_blue { background: var(--lm-light-blue); }
.locations-map.light_grey { background: #f6f6f6; }
.locations-map.no-top-space { margin-top: 0; }
.locations-map.no-bottom-space { margin-bottom: 0; }

.locations-map .row {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 48px 0;
}

.locations-map__title {
	text-align: center;
	margin-bottom: .5rem;
	text-transform: uppercase;
	font-weight: 900;
}

.locations-map__subtitle {
	max-width: 36.25rem;
	margin: 0 auto;
	font-size: 1rem;
	line-height: 170%;
	text-align: center;
}

.locations-map__wrapper {
	display: flex;
	flex-direction: column;
	width: 100%;
	margin-top: 32px;
	overflow: hidden;
	background: #fff;
	border: 1px solid var(--lm-border);
	border-radius: 1rem;
	box-shadow: 0 12px 32px rgba(0, 27, 63, .08);
}

.locations-map__title + .locations-map__wrapper { margin-top: 24px; }

/* Panel */
.locations-map__panel {
	display: flex;
	flex-direction: column;
	padding: 20px;
	border-bottom: 1px solid var(--lm-border);
	font-family: "Mulish", sans-serif;
}

.locations-map__label {
	display: block;
	margin-bottom: .5rem;
	color: var(--lm-navy);
	font-size: .875rem;
	font-weight: 800;
	letter-spacing: .04em;
	text-transform: uppercase;
}

.locations-map__search { margin: 0; }

.locations-map__search-field {
	display: flex;
	border: 2px solid var(--lm-border);
	border-radius: .5rem;
	background: #fff;
	transition: border-color .15s ease;
}

.locations-map__search-field:focus-within { border-color: var(--lm-blue); }

.locations-map__input {
	flex: 1;
	min-width: 0;
	margin: 0;
	padding: .8rem 1rem;
	border: 0;
	border-radius: .5rem 0 0 .5rem;
	background: transparent;
	color: var(--lm-text);
	font: 600 1rem/1.4 "Mulish", sans-serif;
	-webkit-appearance: none;
	appearance: none;
}

.locations-map__input:focus { outline: none; }

.locations-map__submit {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0 .35rem .35rem 0;
	background: var(--lm-navy);
	color: #fff;
	cursor: pointer;
	transition: background .15s ease;
}

.locations-map__submit:hover,
.locations-map__submit:focus-visible { background: var(--lm-blue); }

.locations-map__result:empty { display: none; }

.locations-map__result {
	margin-top: 12px;
	padding: 12px 14px;
	border-radius: .5rem;
	background: var(--lm-light-blue);
	color: var(--lm-text);
	font-size: .9375rem;
	line-height: 1.5;
}

.locations-map__result p { margin: 0; font-size: inherit; line-height: inherit; }
.locations-map__result p + p,
.locations-map__result p + ul,
.locations-map__result ul + p { margin-top: 8px; }
.locations-map__result.is-found { background: #e3f3ea; }
.locations-map__result.is-error { background: #fdecea; }

.locations-map__result a { color: var(--lm-blue); font-weight: 800; }

.locations-map__nearest {
	margin: 0;
	padding: 0;
	list-style: none;
}

.locations-map__nearest li {
	display: flex;
	justify-content: space-between;
	padding: 4px 0;
	border-bottom: 1px dashed rgba(0, 27, 63, .15);
}

.locations-map__nearest li:last-child { border-bottom: 0; }
.locations-map__nearest span { color: var(--lm-muted); font-size: .875rem; }

.locations-map__call { white-space: nowrap; }

.locations-map__count {
	margin: 16px 0 8px;
	color: var(--lm-muted);
	font-size: .8125rem;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
}

.locations-map__list {
	max-height: 220px;
	margin: 0 -8px;
	padding: 0;
	overflow-y: auto;
	list-style: none;
	overscroll-behavior: contain;
}

.locations-map__item { margin: 0; }

.locations-map__item-button {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	margin: 0;
	padding: 10px 8px;
	border: 0;
	border-radius: .375rem;
	background: transparent;
	color: var(--lm-navy);
	font: 700 1rem/1.3 "Mulish", sans-serif;
	text-align: left;
	cursor: pointer;
}

.locations-map__item-button:hover,
.locations-map__item-button:focus-visible { background: var(--lm-light-blue); outline: none; }

.locations-map__item.is-active .locations-map__item-button {
	background: var(--lm-navy);
	color: #fff;
}

.locations-map__item-postcode {
	color: var(--lm-muted);
	font-size: .8125rem;
	font-weight: 600;
}

.locations-map__item.is-active .locations-map__item-postcode { color: rgba(255, 255, 255, .75); }

/* Map */
.locations-map__map {
	position: relative;
	z-index: 0;
	width: 100%;
	height: 380px;
	background: var(--lm-light-blue);
	font-family: "Mulish", sans-serif;
}

/* Softer basemap so the shaded service areas stand out */
.locations-map__tiles { filter: grayscale(.55) saturate(.8) brightness(1.04) contrast(.92); }

.locations-map__dot,
.locations-map__cluster {
	background: none;
	border: 0;
}

.locations-map__dot span {
	display: block;
	width: 18px;
	height: 18px;
	border: 3px solid #fff;
	border-radius: 50%;
	background: #2e68b2;
	box-shadow: 0 1px 4px rgba(0, 27, 63, .4);
	transition: transform .15s ease, background .15s ease;
}

.locations-map__dot:hover span { transform: scale(1.2); }
.locations-map__dot.is-active span { background: #001b3f; transform: scale(1.3); }

.locations-map__cluster span {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	background: #3d6fd6;
	box-shadow: 0 0 0 4px rgba(255, 255, 255, .85), 0 2px 8px rgba(0, 27, 63, .35);
	color: #fff;
	font: 800 1rem/1 "Mulish", sans-serif;
	transition: transform .15s ease, background .15s ease;
}

.locations-map__cluster:hover span { background: #2e68b2; transform: scale(1.08); }

.locations-map .leaflet-tooltip.locations-map__tooltip {
	padding: 4px 10px;
	border: 0;
	border-radius: .375rem;
	background: #001b3f;
	color: #fff;
	font: 700 .8125rem/1.3 "Mulish", sans-serif;
	box-shadow: 0 2px 8px rgba(0, 27, 63, .25);
}

.locations-map .leaflet-tooltip.locations-map__tooltip::before { border-top-color: #001b3f; }

.locations-map__pin {
	background: none;
	border: 0;
}

.locations-map__pin svg {
	display: block;
	width: 28px;
	height: 40px;
	filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .3));
	transition: transform .15s ease;
	transform-origin: 50% 100%;
}

.locations-map__pin path { fill: var(--lm-blue, #2e68b2); }
.locations-map__pin circle { fill: #fff; }
.locations-map__pin.is-search path { fill: #ffc107; }
.locations-map__pin.is-search circle { fill: #001b3f; }

.locations-map .leaflet-popup-content-wrapper { border-radius: .75rem; }
.locations-map .leaflet-popup-content { margin: 14px 16px; }

.locations-map__popup {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 160px;
}

.locations-map__popup-title {
	color: #001b3f;
	font-size: 1.0625rem;
	font-weight: 900;
}

.locations-map__popup-postcode {
	color: #46535c;
	font-size: .8125rem;
}

.locations-map .leaflet-popup-content a.locations-map__popup-link {
	display: inline-block;
	margin-top: 8px;
	padding: 8px 12px;
	border-radius: .375rem;
	background: #001b3f;
	color: #fff;
	font-size: .8125rem;
	font-weight: 800;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
}

.locations-map .leaflet-popup-content a.locations-map__popup-link:hover { background: #2e68b2; }

@media (min-width: 768px) {
	.locations-map .row { padding: 60px 0; }
	.locations-map__subtitle { font-size: 1.125rem; }
	.locations-map__wrapper { flex-direction: row; height: 560px; margin-top: 40px; }
	.locations-map__panel {
		flex: 0 0 320px;
		padding: 24px;
		border-right: 1px solid var(--lm-border);
		border-bottom: 0;
	}
	.locations-map__list { flex: 1; max-height: none; }
	.locations-map__map { flex: 1; height: auto; }
}

@media (min-width: 1080px) {
	.locations-map__panel { flex-basis: 360px; }
	.locations-map__wrapper { height: 600px; }
}
