/*
 * TMReco Acreage Listings — scoped styles.
 * Every selector is prefixed with .tmr-acre so nothing leaks into the theme,
 * and the light resets below keep common theme rules from leaking in.
 * Values mirror the Astro build (acreage-properties-test-update).
 */

.tmr-acre {
	--acre-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Arial, Helvetica, sans-serif;
	--acre-gold: #c5a95f;
	--acre-gold-deep: #a38539;
	--acre-ink: #303030;
	--acre-muted: #686868;

	position: relative;
	background: #f8f6ed;
	padding-block: 84px 140px;
	font-family: var(--acre-sans);
	color: var(--acre-ink);
	scroll-margin-top: var(--tmr-acre-scroll-offset, 24px);
}

/* ---------- theme guards ---------- */
.tmr-acre *,
.tmr-acre *::before,
.tmr-acre *::after { box-sizing: border-box; }
.tmr-acre h2,
.tmr-acre p { margin: 0; padding: 0; }
.tmr-acre img { max-width: 100%; height: auto; border: 0; border-radius: 0; box-shadow: none; }
.tmr-acre a { box-shadow: none; }
.tmr-acre select { height: auto; min-height: 0; border-radius: 0; box-shadow: none; outline-offset: 2px; }
.tmr-acre button { text-transform: none; box-shadow: none; }
.tmr-acre [hidden] { display: none !important; }

/* ---------- layout + headings ---------- */
.tmr-acre .acre-wrap { width: min(1560px, 81.25%); margin-inline: auto; }

.tmr-acre .acre-h2 {
	font-family: var(--acre-sans);
	letter-spacing: .025em;
	text-transform: none;
	color: var(--acre-gold-deep);
	margin: 0;
	font-size: clamp(1.75rem, 2.504vw, 48px);
	font-weight: 700;
	line-height: 1.17;
}
.tmr-acre .acre-h2--center { text-align: center; }

.tmr-acre .acre-sub {
	letter-spacing: .025em;
	color: var(--acre-ink);
	margin: 12px 0 0;
	font-size: clamp(1.125rem, 1.575vw, 30px);
	line-height: 1.36;
}
.tmr-acre .acre-sub--center { text-align: center; }

/* ---------- buttons ---------- */
.tmr-acre .acre-btn {
	min-height: 53px;
	font-family: var(--acre-sans);
	letter-spacing: .04em;
	text-align: center;
	cursor: pointer;
	border: 0;
	border-radius: 1px;
	justify-content: center;
	align-items: center;
	padding: 0 28px;
	font-size: clamp(.875rem, .938vw, 18px);
	font-weight: 700;
	line-height: 1.33;
	text-decoration: none;
	display: inline-flex;
}
.tmr-acre .acre-btn--gold { background: var(--acre-gold); color: #242424; }
.tmr-acre .acre-btn--gold:hover,
.tmr-acre .acre-btn--gold:focus-visible { background: #b6994c; color: #242424; }
.tmr-acre .acre-btn--outline { color: var(--acre-ink); box-shadow: inset 0 0 0 2px var(--acre-gold); background: transparent; }
.tmr-acre .acre-btn--outline:hover,
.tmr-acre .acre-btn--outline:focus-visible { background: #c5a95f1f; color: var(--acre-ink); }
.tmr-acre .acre-btn--sm { min-height: 52px; padding: 0 20px; font-size: 12px; }

/* ---------- filter bar ---------- */
.tmr-acre .acre-filter {
	border-top: 4px solid var(--acre-ink);
	border-bottom: 1px solid #e2e0d6;
	border-inline: 1px solid #e2e0d6;
	background: #f7f7f5;
	grid-template-columns: 1.91fr 1.76fr 1.75fr 243px;
	align-items: center;
	margin: 48px 0 0;
	padding: 0;
	display: grid;
}
.tmr-acre .acre-filter__cell { border-right: 1px solid #d3d6c9; margin: 0; padding: 18px 22px; }
.tmr-acre .acre-filter__cell label {
	letter-spacing: .11em;
	text-transform: uppercase;
	color: #595959;
	margin: 0 0 6px;
	font-size: 10px;
	font-weight: 600;
	line-height: 1.1;
	display: block;
}
.tmr-acre .acre-filter__cell select {
	appearance: none;
	-webkit-appearance: none;
	width: 100%;
	font-family: var(--acre-sans);
	color: var(--acre-ink);
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23595959' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") 100% / 12px 8px no-repeat;
	border: 0;
	margin: 0;
	padding: 0 26px 0 0;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.15;
	cursor: pointer;
}
.tmr-acre .acre-filter__go { text-align: right; margin: 0; padding: 0 22px; }

/* ---------- results ---------- */
.tmr-acre .acre-listings__status { margin: 12px 0 0; font-size: 14px; line-height: 1.45; color: var(--acre-ink); }
.tmr-acre .acre-listings__status:empty { display: none; }

.tmr-acre .acre-listings__box { transition: opacity .2s ease; }
.tmr-acre .acre-listings__box[aria-busy="true"] { opacity: .45; pointer-events: none; }

.tmr-acre .acre-listings__sort { text-align: right; color: var(--acre-muted); margin: 22px 0 18px; font-size: 12px; line-height: 1.33; }

.tmr-acre .acre-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin: 0; padding: 0; list-style: none; display: grid; }

.tmr-acre .acre-card { background: #fff; position: relative; margin: 0; }
.tmr-acre .acre-card__photo { display: block; background: #ece9de; }
.tmr-acre .acre-card__photo img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; height: auto; display: block; }
.tmr-acre .acre-card__body { text-align: center; border-bottom: 1px solid #e2e0d6; padding: 10px 6px 12px; }
.tmr-acre .acre-card__price {
	color: var(--acre-ink);
	font-size: 13px;
	font-weight: 700;
	line-height: 1.4;
	text-decoration: none;
	display: block;
}
.tmr-acre .acre-card__price:hover,
.tmr-acre .acre-card__price:focus-visible { color: var(--acre-gold-deep); text-decoration: underline; }
.tmr-acre .acre-card__addr,
.tmr-acre .acre-card__meta,
.tmr-acre .acre-card__office {
	color: var(--acre-muted);
	overflow-wrap: anywhere;
	margin: 2px 0 0;
	font-size: 11px;
	line-height: 1.45;
}
.tmr-acre .acre-card__meta span { white-space: nowrap; }
.tmr-acre .acre-card__badge { position: absolute; bottom: 34px; right: 6px; width: auto; max-height: 26px; }
.tmr-acre .acre-card__badge--text {
	background: #fff;
	border: 1px solid #d3d6c9;
	color: var(--acre-muted);
	padding: 1px 4px;
	font-size: 9px;
	font-weight: 700;
	letter-spacing: .06em;
	line-height: 1.2;
}

/* ---------- footer: pager + CTAs ---------- */
.tmr-acre .acre-listings__foot { flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; margin-top: 46px; display: flex; }
.tmr-acre .acre-pager {
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 18px;
	font-size: clamp(.9375rem, .988vw, 19px);
	font-weight: 600;
	line-height: 1.37;
	display: flex;
}
.tmr-acre .acre-pager__step { font: inherit; color: var(--acre-ink); background: transparent; border: 0; padding: 0; text-decoration: none; }
.tmr-acre a.acre-pager__step:hover { text-decoration: underline; }
.tmr-acre .acre-pager__step[aria-disabled="true"] { opacity: .35; cursor: default; }
.tmr-acre .acre-pager__nums { flex-wrap: wrap; gap: 4px; display: flex; }
.tmr-acre .acre-pager__nums a,
.tmr-acre .acre-pager__nums span {
	min-width: 24px;
	min-height: 24px;
	color: var(--acre-ink);
	justify-content: center;
	align-items: center;
	padding: 0 3px;
	text-decoration: none;
	display: inline-flex;
}
.tmr-acre .acre-pager__nums a:hover { text-decoration: underline; }
.tmr-acre .acre-pager__nums .is-current { color: var(--acre-gold-deep); text-decoration: underline; }
.tmr-acre .acre-listings__ctas { flex-wrap: wrap; gap: 14px; margin: 0 0 0 auto; display: flex; }

/* ---------- compliance ---------- */
.tmr-acre .acre-listings__disclosure { color: var(--acre-muted); margin-top: 26px; font-size: 12px; line-height: 1.6; }
.tmr-acre .acre-listings__disclosure summary { cursor: pointer; }
.tmr-acre .acre-listings__disclosure summary img { display: inline-block; width: auto; vertical-align: middle; margin: 0 6px 0 2px; }
.tmr-acre .acre-listings__disclosure-text { margin-top: 6px; }
.tmr-acre .acre-listings__disclosure-text p { margin: 0 0 6px; }

/* ---------- empty / fallback / admin-only ---------- */
.tmr-acre .acre-listings__empty { text-align: center; margin: 40px 0 0; }
.tmr-acre .acre-listings__empty a { color: var(--acre-gold-deep); }
.tmr-acre .acre-listings__fallback { margin-top: 40px; }
.tmr-acre .acre-listings__admin-note,
.tmr-acre .acre-listings__diag {
	margin-top: 24px;
	padding: 12px 16px;
	border: 1px dashed #b6994c;
	background: #fffdf5;
	color: var(--acre-ink);
	font-size: 13px;
	line-height: 1.5;
}
.tmr-acre .acre-listings__diag summary { cursor: pointer; font-weight: 600; }
.tmr-acre .acre-listings__diag dl { margin: 8px 0 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 16px; }
.tmr-acre .acre-listings__diag dt { font-weight: 600; }
.tmr-acre .acre-listings__diag dd { margin: 0; overflow-wrap: anywhere; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; }

/* ---------- responsive (same breakpoints as the Astro build) ---------- */
@media (max-width: 1180px) {
	.tmr-acre .acre-wrap { width: calc(100% - 48px); }
	.tmr-acre .acre-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
	.tmr-acre { padding-block: 56px 68px; }
	.tmr-acre .acre-filter { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.tmr-acre .acre-filter__go { grid-column: 1 / -1; padding: 0 22px 18px; }
	.tmr-acre .acre-filter__go .acre-btn { width: 100%; }
}

@media (max-width: 680px) {
	.tmr-acre .acre-grid,
	.tmr-acre .acre-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.tmr-acre .acre-filter__cell:nth-child(2),
	.tmr-acre .acre-filter__cell:nth-child(3) { border-right: 0; }
	.tmr-acre .acre-filter__go { grid-column: auto; padding: 0 12px; }
	.tmr-acre .acre-filter__go .acre-btn { padding-inline: 6px; width: 100%; }
	.tmr-acre .acre-listings__foot { justify-content: flex-start; }
	.tmr-acre .acre-listings__ctas { width: 100%; }
	.tmr-acre .acre-listings__ctas .acre-btn { flex: 1 1 200px; }
}

@media (prefers-reduced-motion: reduce) {
	.tmr-acre .acre-listings__box { transition: none; }
}
