/* ==========================================================================
   Bokka Home archive (/homes/) - page styles
   --------------------------------------------------------------------------
   Loaded after css/bokka-archives.css by lfg_bokka_archive_enqueue( 'homes' ).
   Layout follows sjvhomes.com/available-homes/: filter bar band, then the map
   (left, sticky) beside the community-grouped home cards (right) on wide
   screens; map stacked above the list on tablets; list only on phones.

   The filter bar, compact bands, result count, pagination, empty state and
   card typography are shared with the other archives (css/bokka-archives.css).
   This file holds the map layout and the home card's own structure.

   Markup: plugin bokka/archive-homes block (#available-homes-search) with
   the map aside and the extra card details added by
   partials/archive-homes-helpers.php:
     aside.lfg-homes-map > #lfg-homes-map-canvas
     .lfg-home-card (the plugin's bordered card box)
       figure > .lfg-home-card__price
       .lfg-home-card__body > .lfg-home-card__plan, h3.lfg-home-card__title, .lfg-home-card__meta
       specs grid, .lfg-home-card__cta
   ========================================================================== */

/* --------------------------------------------------------------------------
   Filter bar with State, like Ashlar (QA 2026-09-29)

   The plugin prints the dropdowns in Ashlar's order: price, Communities,
   Floorplans, State, Floorplan Type, Bedrooms, Bathrooms, Square Feet. The
   State dropdown lists the states ticked under Bokka > Filters that have
   homes listed (inc/bokka-archive-template.php), and is no longer hidden
   when that is just one (css/bokka-archives.css).
     phones      price full width, dropdowns in pairs, the odd last one
                 full width
     768-1023    price across two columns with State beside it (upper
                 right), then two rows of three
     1024+       Ashlar's 4 x 2: price and three dropdowns with State upper
                 right, then Floorplan Type under the price at its width
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
	.lfg-archive--homes .available-homes-search-facet-container ul.grid > li:last-child {
		grid-column: 1 / -1;
	}
}

@media (min-width: 768px) and (max-width: 1023px) {
	.lfg-archive--homes .available-homes-search-facet-container ul.grid > li.bokka-price-slider {
		grid-column: 1 / span 2;
	}
	.lfg-archive--homes .available-homes-search-facet-container ul.grid > li:has([data-facet-name="state"]) {
		grid-row: 1;
		grid-column: 3;
		align-self: center;
	}
}

@media (min-width: 1024px) {
	.lfg-archive--homes .available-homes-search-facet-container ul.grid > li.bokka-price-slider {
		grid-row: auto;
	}
}

/* --------------------------------------------------------------------------
   Map + listing layout
   -------------------------------------------------------------------------- */
.lfg-archive--homes .lfg-homes-map {
	display: none;
	position: relative;
	z-index: 0;
	background-color: #E4E6E2;
}
.lfg-archive--homes .lfg-homes-map__canvas {
	width: 100%;
	height: 100%;
}

@media (min-width: 768px) {
	.lfg-archive--homes .lfg-homes-map {
		display: block;
		height: 420px;
	}
}

/* Wide screens: map and list inside a 1440px container with 32px gutters on
   the gray band, like /communities/ and SJV (not full width). The outer
   columns are the gutters, so the filter bar above still spans the page; the
   map sticks 48px from the top. */
@media (min-width: 1200px) {
	.lfg-archive--homes #available-homes-search {
		display: grid;
		grid-template-columns: max(32px, calc((100% - 1376px) / 2)) minmax(0, 5fr) 24px minmax(0, 7fr) max(32px, calc((100% - 1376px) / 2));
		align-items: start;
		background-color: #ECEBE9;
	}
	.lfg-archive--homes #available-homes-search > .available-homes-search-facet-container {
		grid-column: 1 / -1;
	}
	.lfg-archive--homes .lfg-homes-map {
		position: sticky;
		top: 48px;
		grid-column: 2;
		margin: 48px 0;
		height: calc(100vh - 96px);
		min-height: 560px;
		max-height: 820px;
	}
	.lfg-archive--homes #available-homes-search > .available-homes-search-grid-container {
		grid-column: 4;
		padding: 48px 0 0;
	}
}

/* --------------------------------------------------------------------------
   Results
   -------------------------------------------------------------------------- */
.lfg-archive--homes .available-homes-search-grid-container {
	padding-right: 16px;
	padding-left: 16px;
}
@media (min-width: 640px) {
	.lfg-archive--homes .available-homes-search-grid-container {
		padding-right: 32px;
		padding-left: 32px;
	}
}

/* Card grid: 1 / 2 / 3 columns, 2 beside the map. */
.lfg-archive--homes .home-groups .product-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 24px;
	justify-content: stretch;
	max-width: 400px;
	margin: 0 auto;
}
@media (min-width: 700px) {
	.lfg-archive--homes .home-groups .product-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		max-width: none;
	}
}
@media (min-width: 1024px) and (max-width: 1199px) {
	.lfg-archive--homes .home-groups .product-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}
.lfg-archive--homes .home-groups .product-grid > .item {
	max-width: none;
	margin: 0;
	text-align: left;
}

/* --------------------------------------------------------------------------
   Home card structure
   -------------------------------------------------------------------------- */
.lfg-archive--homes .lfg-home-card {
	display: flex;
	flex-direction: column;
	height: 100%;
}
.lfg-archive--homes .product-grid .item > a {
	height: 100%;
}
.lfg-archive--homes .lfg-home-card__body {
	padding-bottom: 4px;
}

/* Specs grid (plugin): a ruled 2 x 2 block. */
.lfg-archive--homes .lfg-home-card > .grid {
	margin: 14px 20px 0;
	padding: 14px 0;
	gap: 12px;
	border-top: 1px solid #E3E3E0;
}
.lfg-archive--homes .lfg-home-card > .grid > div {
	align-items: center;
	min-width: 0;
}

/* "View Home" footer cue. */
.lfg-archive--homes .lfg-home-card__cta {
	display: block;
	margin-top: auto;
	padding: 14px 20px;
	border-top: 1px solid #E3E3E0;
	font-family: Montserrat, sans-serif;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #2F463E;
}
.lfg-archive--homes .lfg-home-card__cta::after {
	content: "";
	display: inline-block;
	width: 7px;
	height: 7px;
	margin-left: 10px;
	border-top: 2px solid currentColor;
	border-right: 2px solid currentColor;
	transform: translateY(-1px) rotate(45deg);
	transition: transform 0.2s ease;
}
.lfg-archive--homes .product-grid .item > a:hover .lfg-home-card__cta::after {
	transform: translate(3px, -1px) rotate(45deg);
}

/* --------------------------------------------------------------------------
   Map info window card (js/archive-homes.js)
   -------------------------------------------------------------------------- */
.lfg-bokka-archive--homes .gm-style .gm-style-iw-c {
	padding: 0;
	border-radius: 0;
}
.lfg-bokka-archive--homes .gm-style .gm-style-iw-d {
	overflow: hidden !important;
}
.lfg-bokka-archive--homes .gm-style .gm-style-iw-chr {
	position: absolute;
	top: 0;
	right: 0;
	z-index: 3;
}
.lfg-bokka-archive--homes .gm-style .gm-style-iw-chr button {
	background: rgba(255, 255, 255, 0.9) !important;
}
.lfg-map-card {
	display: block;
	width: 260px;
	color: #313233;
	text-decoration: none;
}
.lfg-map-card__image {
	position: relative;
	display: block;
	height: 140px;
	background-color: #E4E6E2;
	background-position: center;
	background-size: cover;
}
.lfg-map-card__price {
	position: absolute;
	bottom: 10px;
	left: 0;
	padding: 4px 10px;
	background: #313233;
	font-family: Montserrat, sans-serif;
	font-size: 13px;
	font-weight: 700;
	color: #FFFFFF;
}
.lfg-map-card__body {
	display: block;
	padding: 12px 14px 14px;
}
.lfg-map-card__plan {
	display: block;
	margin-bottom: 2px;
	font-family: Montserrat, sans-serif;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #4C6958;
}
.lfg-map-card__title {
	display: block;
	font-family: "Platypi", serif;
	font-size: 21px;
	font-weight: 500;
	line-height: 1.2;
}
.lfg-map-card__meta {
	display: block;
	margin-top: 2px;
	font-family: Montserrat, sans-serif;
	font-size: 12px;
	font-weight: 500;
	color: #4B4F52;
}
.lfg-map-card__cta {
	display: inline-block;
	margin-top: 10px;
	border-bottom: 2px solid #6A8C73;
	font-family: Montserrat, sans-serif;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #2F463E;
}
