/**
 * Lightweight store locator.
 *
 * Selectors start with "body" to outrank the theme's generic .content-main a / h3 / ol rules.
 */

body .nvm-locator {
	--nvm-loc-green: #34543a;
	--nvm-loc-green-soft: #eef4ef;
	--nvm-loc-gold: #b08d3c;
	--nvm-loc-border: #c9cfca;
	--nvm-loc-text: #2b2b2b;
	--nvm-loc-muted: #66706a;
	--nvm-loc-h: 48px;
	--nvm-loc-map-h: 560px;

	margin: 0 0 48px;
	color: var( --nvm-loc-text );
	font-size: 16px;
}

/* ---------------------------------------------------------------------
 * Search
 * ------------------------------------------------------------------ */

body .nvm-locator__search {
	margin: 0 0 16px;
}

body .nvm-locator__label {
	display: block;
	margin: 0 0 6px;
	font-size: 14px;
	color: var( --nvm-loc-muted );
}

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

body .nvm-locator__field {
	position: relative;
	flex: 1 1 320px;
	min-width: 0;
}

body .nvm-locator input[type="search"] {
	box-sizing: border-box;
	width: 100%;
	height: var( --nvm-loc-h );
	margin: 0;
	padding: 0 16px;
	border: 1px solid var( --nvm-loc-border );
	border-radius: 0;
	background: #fff;
	font-size: 16px; /* No iOS zoom. */
	-webkit-appearance: none;
	appearance: none;
}

body .nvm-locator input[type="search"]:focus {
	border-color: var( --nvm-loc-green );
	outline: 2px solid var( --nvm-loc-green-soft );
	outline-offset: 0;
}

body .nvm-locator__submit,
body .nvm-locator__near {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	box-sizing: border-box;
	height: var( --nvm-loc-h );
	margin: 0;
	padding: 0 22px;
	border: 1px solid var( --nvm-loc-green );
	border-radius: 0;
	font-size: 16px;
	line-height: 1;
	white-space: nowrap;
	cursor: pointer;
}

body .nvm-locator__submit {
	background: var( --nvm-loc-green );
	color: #fff;
}

body .nvm-locator__near {
	background: #fff;
	color: var( --nvm-loc-green );
}

body .nvm-locator__submit:hover,
body .nvm-locator__submit:focus-visible {
	background: #263f2b;
}

body .nvm-locator__near:hover,
body .nvm-locator__near:focus-visible {
	background: var( --nvm-loc-green-soft );
}

body .nvm-locator[data-state="loading"] .nvm-locator__submit {
	opacity: 0.7;
	cursor: progress;
}

/* Suggestions */

body .nvm-locator__suggestions {
	position: absolute;
	z-index: 1001; /* Above Leaflet panes. */
	top: 100%;
	right: 0;
	left: 0;
	margin: 0;
	padding: 4px 0;
	border: 1px solid var( --nvm-loc-border );
	border-top: 0;
	background: #fff;
	box-shadow: 0 8px 18px rgba( 0, 0, 0, 0.12 );
	list-style: none;
}

body .nvm-locator__suggestion {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin: 0;
	padding: 10px 16px;
	cursor: pointer;
}

body .nvm-locator__suggestion[aria-selected="true"],
body .nvm-locator__suggestion:hover {
	background: var( --nvm-loc-green-soft );
}

body .nvm-locator__suggestion.is-town .nvm-locator__suggestion-label {
	font-weight: 700;
	color: var( --nvm-loc-green );
}

body .nvm-locator__suggestion-meta {
	flex: 0 0 auto;
	font-size: 13px;
	color: var( --nvm-loc-muted );
}

/* ---------------------------------------------------------------------
 * Message + layout
 * ------------------------------------------------------------------ */

body .nvm-locator__message {
	margin: 0 0 16px;
	padding: 12px 16px;
	border-left: 4px solid var( --nvm-loc-gold );
	background: #fbf3e4;
	line-height: 1.5;
}

body .nvm-locator__message[hidden],
body .nvm-locator__results[hidden],
body .nvm-locator__suggestions[hidden] {
	display: none;
}

body .nvm-locator__body {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

body .nvm-locator__map {
	position: relative;
	z-index: 0;
	height: var( --nvm-loc-map-h );
	border: 1px solid var( --nvm-loc-border );
	background: #dfe8e0;
}

@media ( max-width: 959px ) {
	body .nvm-locator {
		--nvm-loc-map-h: 380px;
	}
}

@media ( max-width: 480px ) {
	body .nvm-locator__submit,
	body .nvm-locator__near {
		flex: 1 1 calc( 50% - 4px );
	}
}

/* ---------------------------------------------------------------------
 * Results
 * ------------------------------------------------------------------ */

body .nvm-locator__summary {
	margin: 0 0 12px;
	font-weight: 700;
	color: var( --nvm-loc-green );
}

/* Results sit under the map as a card grid: 1 / 2 / 3 columns. */
body .nvm-locator .nvm-locator__list {
	display: grid;
	grid-template-columns: minmax( 0, 1fr );
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

@media ( min-width: 640px ) {
	body .nvm-locator .nvm-locator__list {
		grid-template-columns: repeat( 2, minmax( 0, 1fr ) );
	}
}

@media ( min-width: 1024px ) {
	body .nvm-locator .nvm-locator__list {
		grid-template-columns: repeat( 3, minmax( 0, 1fr ) );
	}
}

body .nvm-locator__more {
	display: block;
	margin: 20px auto 0;
	padding: 0 28px;
	min-height: 44px;
	border: 1px solid var( --nvm-loc-green );
	border-radius: 0;
	background: #fff;
	color: var( --nvm-loc-green );
	font-size: 16px;
	cursor: pointer;
}

body .nvm-locator__more:hover,
body .nvm-locator__more:focus-visible {
	background: var( --nvm-loc-green-soft );
}

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

body .nvm-locator .nvm-locator__result {
	position: relative;
	display: flex;
	flex-direction: column;
	margin: 0 !important; /* Theme indents list items. */
	padding: 16px 18px;
	border: 1px solid #e3e7e4;
	background: #fff;
}

body .nvm-locator__result:hover {
	border-color: var( --nvm-loc-green );
}

body .nvm-locator__distance {
	display: inline-block;
	align-self: flex-start;
	margin: 0 0 8px;
	padding: 2px 10px;
	border-radius: 999px;
	background: var( --nvm-loc-green-soft );
	color: var( --nvm-loc-green );
	font-size: 13px;
	font-weight: 700;
	line-height: 1.6;
}

body .nvm-locator .nvm-locator__name {
	margin: 0 0 6px;
	padding: 0;
	font-family: inherit;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.35;
	letter-spacing: 0;
	text-transform: none;
	color: var( --nvm-loc-green );
}

body .nvm-locator__address {
	margin: 0 0 8px;
	font-size: 15px;
	color: var( --nvm-loc-muted );
}

body .nvm-locator__contact {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin: 0 0 12px;
}

body .nvm-locator__contact a {
	color: var( --nvm-loc-green );
	overflow-wrap: anywhere;
}

body .nvm-locator__phone {
	font-weight: 700;
}

body .nvm-locator__actions {
	margin-top: auto;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

body .nvm-locator__directions,
body .nvm-locator__show {
	display: inline-flex;
	align-items: center;
	box-sizing: border-box;
	min-height: 40px;
	margin: 0;
	padding: 0 14px;
	border: 1px solid var( --nvm-loc-green );
	border-radius: 0;
	background: #fff;
	color: var( --nvm-loc-green );
	font-size: 15px;
	text-decoration: none;
	cursor: pointer;
}

body .nvm-locator a.nvm-locator__directions {
	background: var( --nvm-loc-green );
	color: #fff;
}

body .nvm-locator a.nvm-locator__directions:hover,
body .nvm-locator a.nvm-locator__directions:focus-visible {
	background: #263f2b;
	color: #fff;
}

body .nvm-locator__show:hover,
body .nvm-locator__show:focus-visible {
	background: var( --nvm-loc-green-soft );
}

/* ---------------------------------------------------------------------
 * Map bits
 * ------------------------------------------------------------------ */

body .nvm-locator .leaflet-container {
	font: inherit;
}

body .nvm-locator__pin {
	filter: drop-shadow( 0 2px 2px rgba( 0, 0, 0, 0.35 ) );
}

body .nvm-locator .nvm-locator__cluster {
	display: flex;
	align-items: center;
	justify-content: center;
	border: 3px solid rgba( 255, 255, 255, 0.9 );
	border-radius: 50%;
	background: var( --nvm-loc-green );
	box-shadow: 0 0 0 4px rgba( 52, 84, 58, 0.25 );
	color: #fff;
	font-size: 14px;
	font-weight: 700;
}

body .nvm-locator__popup {
	display: flex;
	flex-direction: column;
	gap: 4px;
	font-size: 14px;
}

body .nvm-locator__popup strong {
	color: var( --nvm-loc-green );
}

body .nvm-locator__popup a {
	color: var( --nvm-loc-green );
}
