/**
 * Listings archive / [foodies_listings] — aligned with homepage UI (see assets/css/home.css).
 */

.sfvd-article--listings {
	margin: 0;
	padding: 0;
	max-width: none;
}

.sfvd-listings {
	--sfvd-listings-radius: var(--sfv-radius, 12px);
	--sfvd-listings-radius-sm: var(--sfv-radius-sm, 8px);
	/* Space above split for hero + filters + section padding (map/list open layout). */
	--flst-split-offset: 260px;
	color: var(--sfv-text, #1f2937);
	background: #fff;
}

body.admin-bar .sfvd-listings {
	--flst-split-offset: 292px;
}

.sfvd-listings-hero {
	position: relative;
	overflow: hidden;
	margin: 0;
	padding: 0;
	background: linear-gradient(125deg, #0f172a 0%, #134e4a 45%, var(--sfv-primary, #0f766e) 100%);
	color: #fff;
	box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12);
	border-radius: 0 0 calc(var(--sfvd-listings-radius) + 4px) calc(var(--sfvd-listings-radius) + 4px);
}

@media (min-width: 960px) {
	.sfvd-listings-hero {
		margin: 1rem 1.25rem 0;
		border-radius: calc(var(--sfvd-listings-radius) + 4px);
	}
}

.sfvd-listings-hero__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(15, 23, 42, 0.12) 0%, rgba(15, 23, 42, 0.5) 100%);
	pointer-events: none;
	z-index: 0;
}

.sfvd-listings-hero__inner {
	position: relative;
	z-index: 1;
	padding: clamp(1.75rem, 4vw, 2.75rem) 1.25rem;
}

.sfvd-listings-hero__kicker {
	margin: 0 0 0.5rem;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.88);
}

.sfvd-listings-hero__title {
	margin: 0 0 1rem;
	font-size: clamp(1.75rem, 4vw, 2.75rem);
	font-weight: 800;
	line-height: 1.12;
	letter-spacing: -0.02em;
}

.sfvd-listings-hero__location {
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.5rem 0.75rem;
	font-size: 0.9375rem;
	color: rgba(255, 255, 255, 0.92);
}

.sfvd-listings-hero__location-label {
	font-weight: 700;
	color: rgba(255, 255, 255, 0.65);
	font-size: 0.6875rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.sfvd-listings-hero__location-value {
	font-weight: 600;
}

/* Filters band */
.sfvd-listings-filters-wrap {
	background: var(--sfv-surface, #f3f4f6);
	padding: 2rem 0 1.5rem;
	border-bottom: 1px solid var(--sfv-border, #e5e7eb);
}

.sfvd-listings-filters-head {
	margin-bottom: 1rem;
}

.sfvd-listings-filters-lead {
	margin: 0;
	font-size: 0.9375rem;
	color: var(--sfv-muted, #6b7280);
	max-width: 40rem;
	line-height: 1.5;
}

.sfvd-listings-results-section {
	padding: 2rem 0 3.5rem;
	background: #fff;
}

/* Filter bar — card */
.flst-searchbar {
	display: flex;
	align-items: stretch;
	flex-wrap: wrap;
	gap: 0.65rem;
	background: #fff;
	border: 1px solid var(--sfv-border, #e5e7eb);
	border-radius: var(--sfvd-listings-radius);
	padding: 1rem;
	box-shadow: var(--sfv-shadow, 0 1px 3px rgba(0, 0, 0, 0.08));
}

.flst-field {
	position: relative;
	display: flex;
	align-items: center;
	min-width: 0;
	flex: 1 1 160px;
}

.flst-field select,
.flst-field input[type="text"] {
	-webkit-appearance: none;
	appearance: none;
	width: 100%;
	min-height: 46px;
	border: 1px solid var(--sfv-border, #e5e7eb);
	outline: none;
	background: #fff;
	padding: 0 2.25rem 0 0.75rem;
	font-size: 0.9375rem;
	font-family: inherit;
	color: var(--sfv-text, #1f2937);
	border-radius: var(--sfvd-listings-radius-sm);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.flst-field input[type="text"] {
	padding-right: 0.75rem;
}

.flst-field select:focus,
.flst-field input[type="text"]:focus {
	border-color: var(--sfv-primary, #0f766e);
	box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}

.flst-select-arrow {
	position: absolute;
	right: 0.65rem;
	top: 50%;
	transform: translateY(-50%);
	pointer-events: none;
	font-size: 0.65rem;
	color: var(--sfv-muted, #6b7280);
}

.flst-btn {
	flex: 0 0 auto;
	border: none;
	border-radius: 999px;
	min-height: 46px;
	padding: 0 1.15rem;
	font-size: 0.875rem;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease, opacity 0.15s ease;
	font-family: inherit;
}

.flst-btn-search {
	background: var(--sfv-primary, #0f766e);
	color: #fff;
}

.flst-btn-search:hover,
.flst-btn-search:focus-visible {
	background: var(--sfv-primary-dark, #115e59);
}

.flst-btn-ghost {
	background: #fff;
	color: var(--sfv-text, #1f2937);
	border: 2px solid var(--sfv-border, #e5e7eb);
}

.flst-btn-ghost:hover,
.flst-btn-ghost:focus-visible {
	background: var(--sfv-surface, #f3f4f6);
	border-color: #cbd5e1;
}

.flst-active-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0 0 1.25rem;
}

.flst-chip {
	display: inline-flex;
	align-items: center;
	padding: 0.35rem 0.75rem;
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 700;
	background: rgba(15, 118, 110, 0.08);
	color: var(--sfv-primary-dark, #115e59);
	border: 1px solid rgba(15, 118, 110, 0.2);
}

/* Map + results: list left, map right when map is open */
.flst-map-split {
	display: block;
}

.flst-map-split--open {
	display: flex;
	flex-direction: row;
	align-items: stretch;
	gap: 1.25rem;
	margin-bottom: 1.25rem;
	/* Fill viewport minus header area; both columns share this height */
	height: calc(100vh - var(--flst-split-offset));
	max-height: calc(100vh - var(--flst-split-offset));
	min-height: 280px;
}

@supports (height: 100svh) {
	.flst-map-split--open {
		height: calc(100svh - var(--flst-split-offset));
		max-height: calc(100svh - var(--flst-split-offset));
	}
}

.flst-map-split--open .flst-results {
	flex: 1 1 50%;
	min-width: 0;
	min-height: 0;
	overflow-y: auto;
	overflow-x: hidden;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
	padding-right: 0.25rem;
}

.flst-map-split--open .flst-map-panel {
	flex: 1 1 50%;
	min-width: 280px;
	min-height: 0;
	margin-bottom: 0;
	display: flex;
	flex-direction: column;
}

.flst-map-split--open .flst-map-canvas {
	flex: 1 1 auto;
	min-height: 0;
	width: 100%;
	height: 100%;
}

@media (max-width: 900px) {
	.flst-map-split--open {
		flex-direction: column;
		height: auto;
		max-height: none;
		min-height: 0;
	}

	/* List scrolls in a bounded band; map uses remaining viewport */
	.flst-map-split--open .flst-results {
		flex: 0 1 auto;
		max-height: min(42vh, 360px);
		min-height: 0;
	}

	.flst-map-split--open .flst-map-panel {
		flex: 1 1 auto;
		min-height: min(50vh, 520px);
	}

	.flst-map-split--open .flst-map-canvas {
		min-height: min(50vh, 520px);
		height: 100%;
	}
}

.flst-map-panel {
	margin-bottom: 1.25rem;
	border: 1px solid var(--sfv-border, #e5e7eb);
	border-radius: var(--sfvd-listings-radius);
	overflow: hidden;
	background: #fff;
	box-shadow: var(--sfv-shadow, 0 1px 3px rgba(0, 0, 0, 0.06));
}

.flst-map-panel[hidden] {
	display: none !important;
}

.flst-map-canvas {
	height: 360px;
	width: 100%;
}

.flst-map-note {
	margin: 0;
	padding: 2rem;
	text-align: center;
	color: var(--sfv-muted, #6b7280);
	font-size: 0.9375rem;
}

.flst-results {
	min-height: 10rem;
	position: relative;
}

/* Grid: home.css provides .sfvd-home-grid--3 */
.flst-grid {
	gap: 1.25rem;
}

/* Media block — img fills the link box (overrides home.css .sfvd-home-card__media img { height: 180px }) */
.flst-card-img-wrap {
	position: relative;
	overflow: hidden;
	border-radius: var(--sfvd-listings-radius) var(--sfvd-listings-radius) 0 0;
	background: var(--sfv-surface, #f3f4f6);
}

.flst-card-img-hit {
	display: block;
	position: relative;
	width: 100%;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	text-decoration: none;
}

.sfvd-listings .sfvd-home-card__media .flst-card-img,
.flst-card-img {
	position: absolute;
	inset: 0;
	z-index: 0;
	width: 100%;
	height: 100%;
	max-height: none;
	object-fit: cover;
	display: block;
	transition: transform 0.35s ease;
}

.sfvd-home-card:hover .flst-card-img {
	transform: scale(1.04);
}

.flst-card-badge {
	position: absolute;
	bottom: 0.65rem;
	left: 0.65rem;
	background: rgba(15, 23, 42, 0.78);
	color: #fff;
	font-size: 0.6875rem;
	font-weight: 700;
	padding: 0.25rem 0.6rem;
	border-radius: 999px;
	z-index: 1;
}

.flst-card-fav {
	position: absolute;
	top: 0.65rem;
	right: 0.65rem;
	width: 2.25rem;
	height: 2.25rem;
	background: rgba(255, 255, 255, 0.95);
	border: 1px solid var(--sfv-border, #e5e7eb);
	border-radius: 50%;
	font-size: 0.95rem;
	line-height: 1;
	color: #9ca3af;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 4;
	transition: color 0.15s ease, background 0.15s ease;
}

.flst-card-fav.active,
.flst-card-fav:hover {
	color: #e11d48;
	background: #fff;
}

.flst-card-lower {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 0 1rem 1.1rem;
}

.flst-card-avatar {
	width: 54px;
	height: 54px;
	border-radius: 50%;
	overflow: hidden;
	border: 3px solid #fff;
	box-shadow: var(--sfv-shadow, 0 2px 8px rgba(0, 0, 0, 0.1));
	margin-top: -27px;
	background: var(--sfv-surface, #f3f4f6);
}

.flst-card-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.flst-stars span {
	color: #d1d5db;
	font-size: 1.125rem;
	line-height: 1;
}

.flst-stars span.filled {
	color: #f59e0b;
}

/* Places & events: left-aligned body */
.flst-card--events .flst-card-img-hit,
.flst-card--places .flst-card-img-hit {
	aspect-ratio: 3 / 2;
}

.flst-card--events .flst-card-lower,
.flst-card--places .flst-card-lower {
	align-items: flex-start;
	padding: 1rem 1.1rem 1.15rem;
}

.flst-card--events .flst-card-avatar,
.flst-card--places .flst-card-avatar {
	display: none;
}

.flst-card--events .flst-card-body,
.flst-card--places .flst-card-body {
	text-align: left;
	padding-top: 0;
}

.flst-card--events .flst-stars,
.flst-card--places .flst-stars {
	justify-content: flex-start;
}

/* CTA: solid primary on light cards (home.css primary is inverted for dark hero) */
.sfvd-listings .sfvd-home-card .flst-view-btn.sfvd-home-btn--primary {
	width: 100%;
	justify-content: center;
	margin-top: auto;
	background: var(--sfv-primary, #0f766e);
	color: #fff;
	border-color: transparent;
}

.sfvd-listings .sfvd-home-card .flst-view-btn.sfvd-home-btn--primary:hover,
.sfvd-listings .sfvd-home-card .flst-view-btn.sfvd-home-btn--primary:focus-visible {
	background: var(--sfv-primary-dark, #115e59);
	color: #fff;
}

.flst-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.65rem;
	padding: 4rem 1.25rem;
	font-size: 0.9375rem;
	color: var(--sfv-muted, #6b7280);
}

.flst-spinner {
	display: inline-block;
	width: 1.75rem;
	height: 1.75rem;
	border: 3px solid var(--sfv-border, #e5e7eb);
	border-top-color: var(--sfv-primary, #0f766e);
	border-radius: 50%;
	animation: flst-spin 0.7s linear infinite;
}

@keyframes flst-spin {
	to {
		transform: rotate(360deg);
	}
}

.flst-no-results,
.sfvd-listings-empty {
	text-align: center;
	padding: 4rem 1.25rem;
	font-size: 1rem;
	color: var(--sfv-muted, #6b7280);
	background: var(--sfv-surface, #f3f4f6);
	border-radius: var(--sfvd-listings-radius);
	border: 1px dashed var(--sfv-border, #e5e7eb);
}

.flst-loadmore-wrap {
	display: none;
	text-align: center;
	margin-top: 2rem;
}

.flst-btn-loadmore {
	cursor: pointer;
	font-family: inherit;
}

.flst-btn-loadmore:disabled {
	opacity: 0.45;
	cursor: default;
}

.flst-sentinel {
	height: 1px;
	visibility: hidden;
	pointer-events: none;
}

@media (max-width: 768px) {
	.flst-searchbar {
		flex-direction: column;
	}

	.flst-field,
	.flst-btn {
		width: 100%;
		justify-content: center;
	}
}
