/**
 * DOVE USA church finder
 *
 * Deliberately low-specificity and colour-light so Elementor's global styles
 * and site colours stay in charge of the look.
 *
 * @package DOVE USA
 * @since 1.0.0
 */

.dove-church-finder {
	--dove-cf-gap: 20px;
	--dove-cf-border: 1px solid rgba(0, 0, 0, 0.12);
	--dove-cf-radius: 4px;
}

/* Controls
   ========================================================================== */

.dove-church-finder__controls {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 12px;
	margin-bottom: 16px;
}

.dove-church-finder__field {
	display: flex;
	flex-direction: column;
	gap: 4px;
	flex: 1 1 260px;
}

.dove-church-finder__field--radius {
	flex: 0 1 170px;
}

.dove-church-finder__field label {
	font-size: 14px;
	font-weight: 600;
}

.dove-church-finder__input-row {
	display: flex;
	gap: 8px;
}

.dove-church-finder__input-row input[type="search"] {
	flex: 1;
	min-width: 0;
}

.dove-church-finder__locate {
	flex: 0 0 auto;
}

.dove-church-finder__status {
	margin: 0 0 12px;
	font-size: 14px;
	opacity: 0.8;
	min-height: 1.4em;
}

/* Layout
   ========================================================================== */

.dove-church-finder__layout {
	display: grid;
	grid-template-columns: 1fr 340px;
	gap: var(--dove-cf-gap);
	align-items: start;
}

.dove-church-finder__map {
	min-height: 360px;
	border: var(--dove-cf-border);
	border-radius: var(--dove-cf-radius);
	z-index: 0; /* keep tiles under Elementor sticky headers */
}

/* Results
   ========================================================================== */

.dove-church-finder__results {
	list-style: none;
	margin: 0;
	padding: 0;
	max-height: 600px;
	overflow-y: auto;
	border: var(--dove-cf-border);
	border-radius: var(--dove-cf-radius);
}

.dove-church-result {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 12px 14px;
	cursor: pointer;
	border-bottom: var(--dove-cf-border);
}

.dove-church-result:last-child {
	border-bottom: none;
}

.dove-church-result:hover,
.dove-church-result:focus-within {
	background: rgba(0, 0, 0, 0.03);
}

.dove-church-result__title {
	font-weight: 600;
	text-decoration: none;
}

.dove-church-result__distance {
	font-size: 13px;
	font-weight: 600;
	opacity: 0.75;
}

.dove-church-result__elders,
.dove-church-result__where {
	font-size: 14px;
	opacity: 0.8;
}

.dove-church-result__directions {
	font-size: 13px;
	margin-top: 4px;
}

/* Popup
   ========================================================================== */

.dove-church-popup {
	font-size: 14px;
	line-height: 1.5;
}

.dove-church-popup__title a {
	text-decoration: none;
}

.dove-church-popup__elders {
	opacity: 0.8;
}

/* No-JS fallback
   ========================================================================== */

.dove-church-finder__fallback {
	columns: 2;
	gap: var(--dove-cf-gap);
}

/* Mobile
   ========================================================================== */

@media (max-width: 880px) {
	.dove-church-finder__layout {
		grid-template-columns: 1fr;
	}

	.dove-church-finder__results {
		max-height: 420px;
	}

	.dove-church-finder__fallback {
		columns: 1;
	}
}

/* ── a single church's location ─────────────────────────────────────────── */

.dove-church-location__map {
	width: 100%;
	border-radius: 4px;
	/* Matches the radius the design system gives images and cards. */
	overflow: hidden;
	background: #DEE3D5;
}

.dove-church-location__fallback {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 18px;
	align-items: baseline;
	margin: 14px 0 0;
}

.dove-church-location__address {
	color: #263238;
}

.dove-church-location__link {
	color: #173F27;
	font-weight: 600;
}

/* The map is a reference, so it must never be the tallest thing on a phone. */
@media (max-width: 767px) {
	.dove-church-location__map {
		height: 280px !important;
	}
}
