/* FES Location Finder
   Restyle via the variables on .fes-locfinder to match the site theme. */
.fes-locfinder {
	--fes-accent: #0b5cab;
	--fes-accent-dark: #08447f;
	--fes-text: #1a2230;
	--fes-muted: #5a6473;
	--fes-border: #e2e6ec;
	--fes-bg: #ffffff;
	--fes-bg-alt: #f5f7fa;
	--fes-radius: 10px;
	--fes-list-height: 620px;
	--fes-map-height: 620px;

	color: var(--fes-text);
	font-family: inherit;
	max-width: 100%;
}

.fes-locfinder *,
.fes-locfinder *::before,
.fes-locfinder *::after {
	box-sizing: border-box;
}

/* --- Search bar --- */
.fes-lf-search {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: stretch;
	margin-bottom: 14px;
}

.fes-lf-field {
	display: flex;
	flex: 1 1 auto;
}

.fes-lf-field-zip {
	flex: 2 1 200px;
}

.fes-lf-field-radius {
	flex: 1 1 150px;
}

.fes-lf-search input[type="text"],
.fes-lf-search select {
	width: 100%;
	padding: 12px 14px;
	font-size: 16px;
	line-height: 1.2;
	color: var(--fes-text);
	background: var(--fes-bg);
	border: 1px solid var(--fes-border);
	border-radius: var(--fes-radius);
	appearance: none;
}

.fes-lf-search input[type="text"]:focus,
.fes-lf-search select:focus {
	outline: 2px solid var(--fes-accent);
	outline-offset: 1px;
	border-color: var(--fes-accent);
}

.fes-lf-btn {
	flex: 0 0 auto;
	padding: 12px 20px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	border-radius: var(--fes-radius);
	border: 1px solid var(--fes-accent);
	background: var(--fes-accent);
	color: #fff;
	text-decoration: none;
	transition: background-color .15s ease, color .15s ease;
}

.fes-lf-btn:hover {
	background: var(--fes-accent-dark);
	border-color: var(--fes-accent-dark);
	text-decoration: none;
}

.fes-lf-geo,
.fes-lf-reset {
	background: transparent;
	color: var(--fes-accent);
	text-decoration: none;
}

.fes-lf-geo:hover,
.fes-lf-reset:hover {
	background: var(--fes-bg-alt);
	color: var(--fes-accent-dark);
	text-decoration: none;
}

.fes-lf-status {
	min-height: 1.2em;
	margin: 0 0 14px;
	font-size: 14px;
	color: var(--fes-muted);
}

/* --- Layout --- */
.fes-lf-body {
	display: grid;
	grid-template-columns: minmax(300px, 400px) 1fr;
	gap: 18px;
	align-items: start;
}

.fes-lf-list {
	list-style: none;
	margin: 0;
	padding: 0;
	max-height: var(--fes-list-height);
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.fes-lf-card {
	padding: 16px;
	background: var(--fes-bg);
	border: 1px solid var(--fes-border);
	border-radius: var(--fes-radius);
	cursor: pointer;
	transition: border-color .15s ease, box-shadow .15s ease;
}

.fes-lf-card:hover {
	border-color: var(--fes-accent);
}

.fes-lf-card.is-active {
	border-color: var(--fes-accent);
	box-shadow: 0 0 0 2px rgba(11, 92, 171, .18);
}

.fes-lf-card-head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 10px;
}

.fes-lf-card-name {
	margin: 0;
	font-size: 18px;
	line-height: 1.25;
}

.fes-lf-card-name a {
	color: var(--fes-text);
	text-decoration: none;
}

.fes-lf-card-name a:hover {
	color: var(--fes-accent);
}

/* Override Elementor's kit h3 rule (Secondary font) with the Accent global font.
   Scoped to the wrapper so it out-specifies `.elementor-kit-N h3`. */
.fes-locfinder .fes-lf-card-name,
.fes-locfinder .fes-lf-card-name a {
	font-family: var(--e-global-typography-accent-font-family), sans-serif;
}

.fes-lf-distance {
	flex: 0 0 auto;
	font-size: 13px;
	font-weight: 700;
	color: var(--fes-accent);
	white-space: nowrap;
}

.fes-lf-addr {
	margin: 8px 0 12px;
	font-size: 14px;
	line-height: 1.45;
	color: var(--fes-muted);
}

.fes-lf-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 16px;
	font-size: 14px;
	font-weight: 600;
}

.fes-lf-actions a {
	color: var(--fes-accent);
	text-decoration: none;
}

.fes-lf-actions a:hover {
	text-decoration: underline;
}

/* --- Map --- */
.fes-lf-map {
	height: var(--fes-map-height);
	border-radius: var(--fes-radius);
	overflow: hidden;
	border: 1px solid var(--fes-border);
	position: sticky;
	top: 20px;
	z-index: 0;
}

.fes-lf-map .fes-lf-pin {
	background: none;
	border: none;
}

.fes-lf-map .leaflet-popup-content {
	font-size: 14px;
	line-height: 1.5;
}

.fes-lf-map .leaflet-popup-content strong {
	font-weight: 700;
}

.fes-lf-map .leaflet-popup-content a {
	color: var(--fes-accent);
	text-decoration: none;
}

.fes-lf-map .leaflet-popup-content a:hover {
	text-decoration: underline;
}

.fes-lf-empty {
	padding: 20px;
	color: var(--fes-muted);
}

/* --- Responsive --- */
@media (max-width: 860px) {
	.fes-lf-body {
		grid-template-columns: 1fr;
	}

	.fes-lf-map {
		position: relative;
		top: 0;
		height: 380px;
		order: -1; /* map above the list on small screens */
	}

	.fes-lf-list {
		max-height: none;
	}
}

@media (max-width: 560px) {
	.fes-lf-field-zip,
	.fes-lf-field-radius {
		flex: 1 1 100%;
	}

	.fes-lf-btn {
		flex: 1 1 auto;
	}
}
