/* Farm Fulfillment Locations — Pickup Location Finder ([ffl_location_finder]) */

.ffl-finder {
	max-width: 1200px;
	margin: 2rem auto;
	padding: 0 1.5rem;
	box-sizing: border-box;
}

.ffl-finder * {
	box-sizing: border-box;
}

.ffl-finder__heading {
	font-size: 28px;
	font-weight: 700;
	margin: 0 0 1rem;
	color: #1f2a20;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

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

.ffl-finder__search-form {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.ffl-finder__query-input {
	flex: 1 1 260px;
	font-size: 17px;
	height: 52px;
	padding: 0 1rem;
	border: 2px solid #ccc;
	border-radius: 8px;
	min-width: 0;
}

.ffl-finder__query-input:focus {
	border-color: #2f5d34;
	outline: none;
	box-shadow: 0 0 0 3px rgba(47, 93, 52, 0.15);
}

.ffl-finder__search-btn {
	background: #2f5d34;
	color: #fff;
	border: none;
	border-radius: 8px;
	height: 52px;
	padding: 0 1.5rem;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
}

.ffl-finder__search-btn:hover,
.ffl-finder__search-btn:focus-visible {
	background: #24462a;
	outline: none;
}

.ffl-finder__error {
	margin: 0.85rem 0 0;
	padding: 0.75rem 1rem;
	background: #fdecea;
	border: 1px solid #f5c2c0;
	color: #7a1f1a;
	border-radius: 8px;
	font-size: 15px;
}

/* --------------------------------------------------------------------- */
/* Shipping CTA                                                          */
/* --------------------------------------------------------------------- */

.ffl-finder__shipping-cta {
	margin-top: 1.25rem;
	padding: 1rem 1.25rem;
	background: #f5faf6;
	border: 1px solid #cfe0d4;
	border-radius: 10px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
}

.ffl-finder__shipping-text {
	margin: 0;
	font-size: 15.5px;
	color: #333;
}

.ffl-finder__shipping-btn {
	background: #fff;
	color: #2f5d34;
	border: 2px solid #2f5d34;
	border-radius: 8px;
	padding: 0.6rem 1.25rem;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
}

.ffl-finder__shipping-btn:hover,
.ffl-finder__shipping-btn:focus-visible {
	background: #2f5d34;
	color: #fff;
	outline: none;
}

/* --------------------------------------------------------------------- */
/* Mobile list/map toggle — hidden on desktop by default                 */
/* --------------------------------------------------------------------- */

.ffl-finder__mobile-toggle {
	display: none;
	margin-top: 1.25rem;
	gap: 0.5rem;
}

.ffl-finder__toggle-btn {
	flex: 1 1 0;
	padding: 0.65rem 1rem;
	font-size: 15px;
	font-weight: 600;
	border: 2px solid #cfe0d4;
	background: #fff;
	color: #2f5d34;
	border-radius: 8px;
	cursor: pointer;
}

.ffl-finder__toggle-btn--active {
	background: #2f5d34;
	color: #fff;
	border-color: #2f5d34;
}

/* --------------------------------------------------------------------- */
/* Body: ~31% list / ~69% map on desktop                                 */
/* --------------------------------------------------------------------- */

.ffl-finder__body {
	display: flex;
	gap: 1.5rem;
	margin-top: 1.5rem;
	align-items: flex-start;
}

.ffl-finder__list {
	flex: 0 0 27%;
	max-width: 27%;
	min-width: 260px; /* Keeps cards readable on narrower desktop/laptop widths; reset to none on mobile below. */
	display: flex;
	flex-direction: column;
	gap: 0.9rem;
	max-height: 640px;
	overflow-y: auto;
	padding-right: 0.35rem;
}

.ffl-finder__map-wrap {
	flex: 1 1 73%;
	position: sticky;
	top: 1rem;
}

.ffl-finder__map {
	width: 100%;
	height: 640px;
	border-radius: 12px;
	overflow: hidden;
	border: 1px solid #e0e0e0;
}

/* --------------------------------------------------------------------- */
/* Location cards                                                        */
/* --------------------------------------------------------------------- */

.ffl-finder__card {
	background: #fff;
	border: 2px solid #e2e2e2;
	border-radius: 12px;
	padding: 0.9rem 0.9rem;
	cursor: pointer;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ffl-finder__card:hover,
.ffl-finder__card:focus-within {
	border-color: #2f5d34;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.ffl-finder__card--fedex {
	border-color: #cfe0d4;
	background: #f5faf6;
}

.ffl-finder__card-title {
	margin: 0 0 0.2rem;
	font-size: 18px;
	font-weight: 700;
	color: #1f2a20;
}

.ffl-finder__card-address {
	margin: 0 0 0.15rem;
	font-size: 15px;
	font-weight: 400;
	color: #2f4a3a;
}

.ffl-finder__card-host-name {
	margin: 0.15rem 0 0;
	font-size: 14px;
	font-weight: 400;
	color: #555;
}

.ffl-finder__card-host-phone {
	margin: 0.1rem 0 0;
	font-size: 14px;
}

.ffl-finder__card-host-phone a {
	color: #2f5d34;
	font-weight: 600;
	text-decoration: underline;
}

.ffl-finder__card-host-phone a:hover,
.ffl-finder__card-host-phone a:focus-visible {
	color: #1c3820;
}

.ffl-finder__card-pickup,
.ffl-finder__card-times {
	margin: 0.15rem 0 0;
	font-size: 15px;
	font-weight: 400;
	color: #444;
	line-height: 1.45;
}

.ffl-finder__card-pickup {
	margin-top: 0.4rem;
}

.ffl-finder__card-pickup strong,
.ffl-finder__card-times strong {
	font-weight: 700;
	color: #1f2a20;
}

.ffl-finder__card-distance {
	margin: 0.15rem 0 0;
	font-size: 12px;
	font-weight: 400;
	color: #7a7a7a;
}

.ffl-finder__card-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem;
	margin-top: 0.55rem;
}

.ffl-finder__card-actions-sep {
	color: #bbb;
	font-size: 13px;
}

.ffl-finder__card-shop-link,
.ffl-finder__card-detail-link {
	background: none;
	border: none;
	padding: 0.2rem 0;
	margin: 0;
	color: #2f5d34;
	font-size: 13px;
	font-weight: 600;
	text-decoration: underline;
	cursor: pointer;
	line-height: 1.4;
}

.ffl-finder__card-shop-link:hover,
.ffl-finder__card-shop-link:focus-visible,
.ffl-finder__card-detail-link:hover,
.ffl-finder__card-detail-link:focus-visible {
	color: #1c3820;
}

.ffl-finder__card-shop-link:disabled {
	opacity: 0.6;
	cursor: default;
}

/* --------------------------------------------------------------------- */
/* Map popup content (rendered inside Leaflet's own popup chrome)        */
/* --------------------------------------------------------------------- */

.ffl-finder__popup-body {
	min-width: 180px;
	font-family: inherit;
}

.ffl-finder__popup-title {
	margin: 0 0 0.3rem;
	font-size: 16px;
	font-weight: 700;
	color: #1f2a20;
}

.ffl-finder__popup-address {
	margin: 0 0 0.15rem;
	font-size: 13px;
	font-weight: 400;
	color: #2f4a3a;
}

.ffl-finder__popup-host-name {
	margin: 0.1rem 0 0;
	font-size: 12px;
	font-weight: 400;
	color: #555;
}

.ffl-finder__popup-host-phone {
	margin: 0.05rem 0 0;
	font-size: 12px;
}

.ffl-finder__popup-host-phone a {
	color: #2f5d34;
	font-weight: 600;
	text-decoration: underline;
}

.ffl-finder__popup-host-phone a:hover,
.ffl-finder__popup-host-phone a:focus-visible {
	color: #1c3820;
}

.ffl-finder__popup-pickup,
.ffl-finder__popup-times {
	margin: 0.1rem 0 0;
	font-size: 13px;
	font-weight: 400;
	color: #444;
	line-height: 1.4;
}

.ffl-finder__popup-pickup {
	margin-top: 0.3rem;
}

.ffl-finder__popup-pickup strong,
.ffl-finder__popup-times strong {
	font-weight: 700;
	color: #1f2a20;
}

.ffl-finder__popup-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem;
	margin-top: 0.45rem;
}

.ffl-finder__popup-actions-sep {
	color: #bbb;
	font-size: 12px;
}

.ffl-finder__popup-shop-link,
.ffl-finder__popup-detail-link {
	background: none;
	border: none;
	padding: 0.15rem 0;
	margin: 0;
	color: #2f5d34;
	font-size: 12px;
	font-weight: 600;
	text-decoration: underline;
	cursor: pointer;
	line-height: 1.4;
}

.ffl-finder__popup-shop-link:hover,
.ffl-finder__popup-shop-link:focus-visible,
.ffl-finder__popup-detail-link:hover,
.ffl-finder__popup-detail-link:focus-visible {
	color: #1c3820;
}

.ffl-finder__popup-shop-link:disabled {
	opacity: 0.6;
	cursor: default;
}

/* --------------------------------------------------------------------- */
/* Mobile                                                                 */
/* --------------------------------------------------------------------- */

@media (max-width: 860px) {
	.ffl-finder__heading {
		font-size: 24px;
	}

	.ffl-finder__search-form {
		flex-direction: column;
		align-items: stretch;
	}

	.ffl-finder__mobile-toggle {
		display: flex;
	}

	.ffl-finder__body {
		flex-direction: column;
	}

	.ffl-finder__list,
	.ffl-finder__map-wrap {
		flex: 1 1 100%;
		max-width: 100%;
		min-width: 0;
		position: static;
	}

	.ffl-finder__map {
		height: 60vh;
	}

	/* List/Map toggle: only one panel visible at a time on mobile. */
	.ffl-finder[data-ffl-active-view='list'] .ffl-finder__map-wrap {
		display: none;
	}

	.ffl-finder[data-ffl-active-view='map'] .ffl-finder__list {
		display: none;
	}

	.ffl-finder__card-shop-link,
	.ffl-finder__card-detail-link {
		font-size: 14px;
		padding: 0.35rem 0;
	}
}
