/* ==========================================================================
   Bokka Model archive (/models/) - archive-bokka_model.php
   --------------------------------------------------------------------------
   Loaded after css/bokka-archives.css by lfg_bokka_archive_enqueue().
   Layout follows sjvhomes.com/model-homes/ and matches /homes/: the map on
   the left (sticky) beside the city-grouped model cards on wide screens, the
   map as a band above the list on tablets, list only on phones.

   The compact group bands, result count and card box/typography are shared
   with the other archives (css/bokka-archives.css). This file holds the
   layout and the model card's own rows (specs, visit details).

   Everything is scoped to .lfg-archive--models. The section also carries
   .bokka-plugin, so the plugin's Tailwind utilities used in the card markup
   (relative, w-full, h-56, object-cover, lazy-image ...) resolve.
   Salient's `p { padding-bottom }` and `ul li` rules bleed in and are reset
   here with enough specificity to beat main-styles.css.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Map + list layout
   -------------------------------------------------------------------------- */
.lfg-archive--models .lfg-models {
	background-color: #ECEBE9;
}

.lfg-archive--models .lfg-models__map-col {
	display: none;
	position: relative;
	z-index: 0;
	background-color: #E4E6E2;
}
.lfg-archive--models .lfg-models__map {
	width: 100%;
	height: 100%;
}

.lfg-archive--models .lfg-models__list {
	min-width: 0;
	padding: 40px 16px 64px;
}

@media (min-width: 640px) {
	.lfg-archive--models .lfg-models__list {
		padding-right: 32px;
		padding-left: 32px;
	}
}

@media (min-width: 768px) {
	.lfg-archive--models .lfg-models__map-col {
		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; the map sticks 48px from the top. */
@media (min-width: 1200px) {
	.lfg-archive--models .lfg-models.has-map {
		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;
	}
	.lfg-archive--models .lfg-models__map-col {
		grid-column: 2;
		position: sticky;
		top: 48px;
		margin: 48px 0;
		height: calc(100vh - 96px);
		min-height: 560px;
		max-height: 820px;
	}
	.lfg-archive--models .lfg-models.has-map .lfg-models__list {
		grid-column: 4;
		padding: 48px 0 64px;
	}
	.lfg-archive--models .lfg-models:not(.has-map) .lfg-models__list {
		max-width: 1280px;
		margin: 0 auto;
	}
}

/* --------------------------------------------------------------------------
   City groups
   A city with one model takes one column, so single-model cities pair up
   instead of leaving a gap; a city with several spans both and lays its
   cards out two-up.
   -------------------------------------------------------------------------- */
.lfg-archive--models .lfg-models__groups {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 0 24px;
	max-width: 400px;
	margin: 0 auto;
}
@media (min-width: 700px) {
	.lfg-archive--models .lfg-models__groups {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		max-width: none;
	}
	.lfg-archive--models .lfg-models__group.is-wide {
		grid-column: 1 / -1;
	}
	.lfg-archive--models .lfg-models__group.is-wide .lfg-models__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.lfg-archive--models .lfg-models__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 24px;
}

/* Empty state. */
.lfg-archive--models .lfg-models__empty {
	max-width: 42rem;
	margin: 0 auto;
	padding: 40px 24px;
	border-top: 4px solid #6A8C73;
	background: #FFFFFF;
	text-align: center;
}
.lfg-archive--models .lfg-models .lfg-models__empty h3 {
	margin: 0 0 8px;
	font-family: "Platypi", serif;
	font-size: 28px;
	font-weight: 500;
	color: #313233;
}
.lfg-archive--models .lfg-models .lfg-models__empty p {
	margin: 0;
	padding: 0;
	font-family: Montserrat, sans-serif;
	color: #4B4F52;
}

/* --------------------------------------------------------------------------
   Model card structure
   -------------------------------------------------------------------------- */
.lfg-archive--models .lfg-model-card {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
}
.lfg-archive--models .lfg-model-card__media {
	background: #ECEBE9;
}
.lfg-archive--models .lfg-model-card__status {
	background-color: #6A8C73;
}
.lfg-archive--models .lfg-model-card__status.is-muted {
	background-color: #6C7076;
}
.lfg-archive--models .lfg-model-card__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
}

/* Stretched link: the whole card opens the model. */
.lfg-archive--models .lfg-models .lfg-model-card__link {
	color: inherit;
	text-decoration: none;
}
.lfg-archive--models .lfg-model-card__link::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}
.lfg-archive--models .lfg-model-card__link:focus-visible {
	outline: none;
}
.lfg-archive--models .lfg-model-card:focus-within {
	outline: 2px solid #6A8C73;
	outline-offset: 3px;
}

/* Spec grid: 2 x 2, ruled off like the home card. */
.lfg-archive--models .lfg-models .lfg-model-card__specs {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	margin: 14px 0 0;
	padding: 14px 0 0;
	border-top: 1px solid #E3E3E0;
	list-style: none;
}
.lfg-archive--models .lfg-models .lfg-model-card__specs li {
	display: flex;
	align-items: center;
	margin: 0;
	padding: 0;
	list-style: none;
}
.lfg-archive--models .lfg-model-card__specs li > span {
	min-width: 0;
}

/* Visit details: address (directions), hours, phone. */
.lfg-archive--models .lfg-models .lfg-model-card__details {
	margin: 14px 0 0;
	padding: 14px 0 0;
	border-top: 1px solid #E3E3E0;
	list-style: none;
}
.lfg-archive--models .lfg-models .lfg-model-card__details li {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-family: Montserrat, sans-serif;
	font-size: 13px;
	line-height: 1.45;
	color: #4B4F52;
}
.lfg-archive--models .lfg-models .lfg-model-card__details li + li {
	margin-top: 6px;
}
.lfg-archive--models .lfg-model-card__details svg {
	flex: 0 0 16px;
	width: 16px;
	height: 16px;
	margin-top: 1px;
	fill: none;
	stroke: #6A8C73;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}
/* Links above the stretched card link. */
.lfg-archive--models .lfg-models .lfg-model-card__details a {
	position: relative;
	z-index: 2;
	color: #4B4F52;
	text-decoration: none;
	text-underline-offset: 3px;
}
.lfg-archive--models .lfg-models .lfg-model-card__details a:hover,
.lfg-archive--models .lfg-models .lfg-model-card__details a:focus {
	color: #2F463E;
	text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Map info window (js/archive-models.js)
   Google wraps it in its own chrome; this is just our content. The map id is
   in every selector so Salient's global img/p rules (which load later)
   cannot win.
   -------------------------------------------------------------------------- */
#lfg-models-map .lfg-models-iw,
#lfg-models-map .lfg-models-iw__head {
	width: 236px;
	font-family: Montserrat, sans-serif;
	color: #313233;
}
/* The plugin's global map CSS zeroes padding on every info window child
   with !important (`.gm-style-iw.gm-style-iw-c > div > div`). */
#lfg-models-map .gm-style-iw .lfg-models-iw {
	box-sizing: border-box;
	width: 260px;
	padding: 0 12px 12px !important;
}
#lfg-models-map .gm-style-iw .lfg-models-iw__head {
	width: auto;
	padding: 12px 0 8px 12px !important;
}
#lfg-models-map .lfg-models-iw img.lfg-models-iw__img {
	display: block;
	width: 100%;
	height: 132px !important;
	max-width: none;
	margin: 0 0 10px;
	object-fit: cover;
	background: #ECEBE9;
}
#lfg-models-map p.lfg-models-iw__eyebrow {
	margin: 0 0 2px;
	padding: 0;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #4C6958;
}
#lfg-models-map p.lfg-models-iw__title {
	margin: 0;
	padding: 0;
	font-family: "Platypi", serif;
	font-size: 21px;
	font-weight: 500;
	line-height: 1.2;
	color: #313233;
}
#lfg-models-map p.lfg-models-iw__address {
	margin: 0 0 8px;
	padding: 0;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.45;
	color: #4B4F52;
	opacity: 1;
}
#lfg-models-map a.lfg-models-iw__link {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #2F463E;
	text-decoration: none;
	border-bottom: 2px solid #6A8C73;
}
#lfg-models-map a.lfg-models-iw__link:hover,
#lfg-models-map a.lfg-models-iw__link:focus {
	color: #6A8C73;
}
