/**
 * Heartfelt Funeral Company - Standalone Location Search styles.
 *
 * Re-uses the shared .hfc-modal / .hfc-detail / .hfc-lightbox / .hfc-btn rules
 * from hfc-public.css. Those rules read the --hfc-* design tokens, so the same
 * palette is declared here on the .hfc-location-search root.
 */

.hfc-location-search {
	--hfc-navy: #1b3a5b;
	--hfc-navy-dark: #14304c;
	--hfc-gold: #d9a441;
	--hfc-gold-dark: #c48f2f;
	--hfc-ink: #243b53;
	--hfc-muted: #64748b;
	--hfc-line: #e4e8ee;
	--hfc-bg: #f5f7fa;
	--hfc-radius: 10px;
	position: relative;
	max-width: 1140px;
	margin: 0 auto;
	color: var(--hfc-ink);
	font-size: 16px;
	line-height: 1.5;
	box-sizing: border-box;
}

.hfc-location-search *,
.hfc-location-search *::before,
.hfc-location-search *::after {
	box-sizing: border-box;
}

/* The [hidden] attribute must win over the display rules on .hfc-loader /
   .hfc-lightbox / .hfc-notice, otherwise the spinner, lightbox and notice are
   painted on the very first load. (The shared rule is scoped to the quote
   builder root, so it does not reach this shortcode.) */
.hfc-location-search [hidden] {
	display: none !important;
}

/* ---------- Heading / intro ---------- */
.hfc-ls-heading {
	color: var(--hfc-navy);
	font-size: 26px;
	margin: 0 0 8px;
	line-height: 1.2;
}

.hfc-ls-intro {
	color: var(--hfc-muted);
	margin: 0 0 20px;
	max-width: 720px;
}

/* ---------- Search bar ---------- */
.hfc-ls-searchbar {
	position: relative;
	margin-bottom: 22px;
}

.hfc-ls-searchbar__icon {
	position: absolute;
	top: 50%;
	left: 18px;
	transform: translateY( -50% );
	color: var(--hfc-muted);
	pointer-events: none;
}

.hfc-ls-search {
	width: 100%;
	padding: 16px 20px 16px 48px;
	font: inherit;
	color: var(--hfc-ink);
	background: #fff;
	border: 1px solid var(--hfc-line);
	border-radius: var(--hfc-radius);
	box-shadow: 0 2px 8px rgba( 20, 48, 76, 0.04 );
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hfc-ls-search:focus {
	outline: 0;
	border-color: var(--hfc-navy);
	box-shadow: 0 0 0 3px rgba( 27, 58, 91, 0.12 );
}

.hfc-ls-typing {
	position: absolute;
	top: 50%;
	right: 18px;
	width: 18px;
	height: 18px;
	transform: translateY( -50% );
	border: 2px solid var(--hfc-line);
	border-top-color: var(--hfc-navy);
	border-radius: 50%;
	opacity: 0;
	transition: opacity 0.2s ease;
}

.hfc-ls-typing.is-active {
	opacity: 1;
	animation: hfc-ls-spin 0.7s linear infinite;
}

@keyframes hfc-ls-spin {
	to {
		transform: translateY( -50% ) rotate( 360deg );
	}
}

/* ---------- Result count ---------- */
.hfc-ls-count {
	color: var(--hfc-muted);
	font-size: 14px;
	margin-bottom: 16px;
}

/* ---------- Grid ---------- */
.hfc-ls-grid {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 260px, 1fr ) );
	gap: 22px;
}

/* Honour the admin-configured column count on wider screens. */
@media ( min-width: 981px ) {
	.hfc-ls-results[data-columns="1"] .hfc-ls-grid {
		grid-template-columns: 1fr;
	}
	.hfc-ls-results[data-columns="2"] .hfc-ls-grid {
		grid-template-columns: repeat( 2, 1fr );
	}
	.hfc-ls-results[data-columns="3"] .hfc-ls-grid {
		grid-template-columns: repeat( 3, 1fr );
	}
	.hfc-ls-results[data-columns="4"] .hfc-ls-grid {
		grid-template-columns: repeat( 4, 1fr );
	}
	.hfc-ls-results[data-columns="5"] .hfc-ls-grid {
		grid-template-columns: repeat( 5, 1fr );
	}
}

@media ( max-width: 600px ) {
	.hfc-ls-grid {
		grid-template-columns: 1fr;
	}
}

/* ---------- Card ---------- */
.hfc-ls-card {
	position: relative;
	display: flex;
	flex-direction: column;
	border: 1px solid var(--hfc-line);
	border-radius: var(--hfc-radius);
	overflow: hidden;
	background: #fff;
	cursor: pointer;
	text-align: left;
	transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.hfc-ls-card:hover {
	box-shadow: 0 10px 26px rgba( 20, 48, 76, 0.12 );
	border-color: var(--hfc-gold);
	transform: translateY( -2px );
}

.hfc-ls-card:focus-visible {
	outline: 2px solid var(--hfc-navy);
	outline-offset: 2px;
}

.hfc-ls-card__media {
	aspect-ratio: 4 / 3;
	background: var(--hfc-bg);
	overflow: hidden;
}

.hfc-ls-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.3s ease;
}

.hfc-ls-card:hover .hfc-ls-card__media img {
	transform: scale( 1.04 );
}

.hfc-ls-card__body {
	padding: 16px 18px 18px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 1;
}

.hfc-ls-card__title {
	margin: 0;
	font-size: 18px;
	color: var(--hfc-navy);
	line-height: 1.3;
}

.hfc-ls-card__price {
	font-weight: 700;
	color: var(--hfc-ink);
	font-size: 16px;
}

.hfc-ls-card__address {
	display: flex;
	align-items: flex-start;
	gap: 4px;
	margin: 0;
	font-size: 13px;
	color: var(--hfc-muted);
}

.hfc-ls-card__address .dashicons {
	flex: 0 0 auto;
	font-size: 16px;
	width: 16px;
	height: 16px;
	color: var(--hfc-gold);
}

.hfc-ls-card__desc {
	margin: 0;
	font-size: 13px;
	color: var(--hfc-muted);
	line-height: 1.5;
	flex: 1;
}

/* ---------- Pagination (shares .hfc-pagination from public CSS) ---------- */
.hfc-location-search .hfc-pagination {
	margin-top: 26px;
}

/* ---------- Call-a-member prompt ---------- */
.hfc-ls-help {
	text-align: center;
	margin: 30px auto 0;
	max-width: 760px;
}

.hfc-ls-help__text {
	color: var(--hfc-ink);
	margin: 0 0 14px;
}

.hfc-ls-call {
	text-decoration: none;
}

/* ---------- Empty / notice ---------- */
.hfc-location-search .hfc-empty {
	color: var(--hfc-muted);
	padding: 30px 0;
	text-align: center;
}
