/* =============================================================================
   Listing Filter Shortcode — v2.0.0
   All selectors scoped to .lf-* — zero global bleed, FSE-safe.
   ============================================================================= */

/* ---- Custom properties ---------------------------------------------------- */

.lf-wrap {
	--lf-accent:       #1a5276;
	--lf-accent-light: #2e86c1;
	--lf-text:         #1c1c1c;
	--lf-text-muted:   #6b7280;
	--lf-border:       #d1d5db;
	--lf-bg-form:      #f8fafc;
	--lf-bg-card:      #ffffff;
	--lf-radius:       6px;
	--lf-shadow:       0 2px 12px rgba(0,0,0,0.08);
	--lf-shadow-hover: 0 6px 24px rgba(0,0,0,0.13);
	--lf-gap:          1.5rem;
	width: 100%;
	font-family: inherit;
	color: var(--lf-text);
}

/* ---- Filter form ---------------------------------------------------------- */

.lf-form {
	background: var(--lf-bg-form);
	border: 1px solid var(--lf-border);
	border-radius: var(--lf-radius);
	padding: 1.25rem 1.5rem;
	margin-bottom: 2rem;
}

.lf-fields {
	display: flex;
	flex-wrap: wrap;
	gap: 0.875rem;
	align-items: flex-end;
}

.lf-field {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	flex: 1 1 0;
	min-width: 0;
}

/* Name field: same flex weight but extra right margin for visual separation */
.lf-field--text {
	flex: 1 1 0;
	margin-right: 1rem;
}

.lf-field label {
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	color: var(--lf-text-muted);
}

.lf-field select,
.lf-field input[type="text"] {
	width: 100%;
	padding: 0.5rem 0.75rem;
	border: 1px solid var(--lf-border);
	border-radius: var(--lf-radius);
	background: #fff;
	font-size: 0.9375rem;
	color: var(--lf-text);
	line-height: 1.4;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	appearance: auto;
	-webkit-appearance: auto;
}

.lf-field select:focus,
.lf-field input[type="text"]:focus {
	outline: none;
	border-color: var(--lf-accent-light);
	box-shadow: 0 0 0 3px rgba(46, 134, 193, 0.18);
}

/* ---- Buttons -------------------------------------------------------------- */

.lf-btn {
	padding: 0.56rem 1.4rem;
	border: 2px solid transparent;
	border-radius: var(--lf-radius);
	font-size: 0.9rem;
	font-weight: 700;
	cursor: pointer;
	white-space: nowrap;
	flex-shrink: 0;
	align-self: flex-end;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
	line-height: 1.4;
}

/* Primary — search */
.lf-btn:not(.lf-btn--reset) {
	background: var(--lf-accent);
	color: #fff;
}
.lf-btn:not(.lf-btn--reset):hover {
	background: var(--lf-accent-light);
}

/* Secondary — reset */
.lf-btn--reset {
	background: transparent;
	color: var(--lf-accent);
	border-color: var(--lf-accent);
}
.lf-btn--reset:hover {
	background: var(--lf-accent);
	color: #fff;
}

/* ---- Count ---------------------------------------------------------------- */

.lf-count {
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--lf-text-muted);
	margin: 0 0 1.25rem;
	letter-spacing: 0.01em;
}

/* ---- Results / loading state --------------------------------------------- */

.lf-results {
	transition: opacity 0.2s ease;
}

.lf-results.lf-loading {
	opacity: 0.35;
	pointer-events: none;
}

/* ---- Grid — 3 columns, responsive ---------------------------------------- */

.lf-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--lf-gap);
}

/* 2 columns on tablet */
@media (max-width: 900px) {
	.lf-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* 1 column on mobile */
@media (max-width: 560px) {
	.lf-grid {
		grid-template-columns: 1fr;
	}

	.lf-fields {
		flex-direction: column;
		gap: 0.75rem;
	}

	.lf-field,
	.lf-field--text {
		flex: 1 1 100%;
		min-width: 0;
		max-width: 100%;
		width: 100%;
		margin-right: 0;
	}

	.lf-field select,
	.lf-field input[type="text"] {
		width: 100%;
		box-sizing: border-box;
	}

	.lf-btn {
		width: 100%;
		text-align: center;
		flex-shrink: 0;
	}
}

/* ---- Card ----------------------------------------------------------------- */

.lf-card {
	display: flex;
	flex-direction: column;
	background: var(--lf-bg-card);
	border: 1px solid var(--lf-border);
	border-radius: var(--lf-radius);
	overflow: hidden;
	box-shadow: var(--lf-shadow);
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.lf-card:hover {
	box-shadow: var(--lf-shadow-hover);
	transform: translateY(-2px);
}

/* ---- Card media ----------------------------------------------------------- */

.lf-card__media {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: #e8edf2;
	flex-shrink: 0;
}

.lf-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.35s ease;
}

.lf-card:hover .lf-card__img {
	transform: scale(1.03);
}

.lf-card__img-placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #dde3ea;
	color: var(--lf-text-muted);
	font-size: 0.8rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

/* ---- Badge --------------------------------------------------------------- */

.lf-card__badge {
	position: absolute;
	top: 0.6rem;
	left: 0.6rem;
	background: var(--lf-accent);
	color: #fff;
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	padding: 0.2rem 0.55rem;
	border-radius: 3px;
	line-height: 1.5;
}

/* ---- Card body ------------------------------------------------------------ */

.lf-card__body {
	padding: 1rem 1.1rem 1.25rem;
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
	flex: 1;
}

.lf-card__title {
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.3;
	margin: 0;
	color: var(--lf-text);
}

/* ---- Meta list ------------------------------------------------------------ */

.lf-card__meta {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
}

.lf-card__meta li {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 0.5rem;
	font-size: 0.875rem;
	border-bottom: 1px solid #f0f2f4;
	padding-bottom: 0.3rem;
}

.lf-card__meta li:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.lf-card__meta-label {
	color: var(--lf-text-muted);
	font-weight: 500;
	flex-shrink: 0;
}

.lf-card__meta-value {
	font-weight: 700;
	color: var(--lf-text);
	text-align: right;
}

/* ---- CTA link ------------------------------------------------------------- */

.lf-card__cta {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	margin-top: auto;
	padding-top: 0.5rem;
	font-size: 0.875rem;
	font-weight: 700;
	color: var(--lf-accent);
	text-decoration: none;
	border-top: 1px solid var(--lf-border);
	transition: color 0.15s ease, gap 0.15s ease;
}

.lf-card__cta:hover {
	color: var(--lf-accent-light);
	gap: 0.55rem;
}

/* ---- No results ----------------------------------------------------------- */

.lf-no-results {
	padding: 3rem 1rem;
	text-align: center;
	color: var(--lf-text-muted);
	font-size: 0.95rem;
}

.lf-no-results a,
.lf-reset-link {
	color: var(--lf-accent);
	font-weight: 600;
	text-decoration: underline;
	cursor: pointer;
}