/**
 * HomeProp /rent detail page — immersive render layer (mosaic + lightbox).
 * Template: single-rental-listing.php
 *
 * Tokens:
 *   Poppins typeface
 *   gold      #EEB211  (faint rgba(238,178,17,.13))
 *   dark      #212221
 *   text      #333 / #444
 *   light     #FFFFFF / #F8F8F8
 *   cream     #F5EFE3
 *
 * Full-bleed bands (neighborhood) break out of the theme's content container
 * via the 100vw / negative-margin trick on the main wrapper; the mosaic + stats
 * band + body are re-constrained to a max-width.
 */

.hp-rental-listing {
	width: 100vw;
	margin-left: calc(50% - 50vw);
	font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	color: #333;
	box-sizing: border-box;
	overflow-x: clip;
	position: relative; /* clean stacking root for the full-bleed bands */
}

.hp-rental-listing *,
.hp-rental-listing *::before,
.hp-rental-listing *::after {
	box-sizing: border-box;
}

/* ---------- 1. PHOTO MOSAIC ---------- */

.hp-rental-mosaic {
	/* Full-bleed: .hp-rental-listing is already a 100vw break-out wrapper
	   (overflow-x: clip guards against the scrollbar-width overflow), so the
	   mosaic just fills it edge-to-edge. */
	width: 100%;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr 1fr; /* main | thumb grid */
	grid-template-rows: minmax(0, 1fr); /* A-fix: row shrinks to the band height (was auto -> sized to image height -> overflow under the stats band) */
	gap: 6px;
	/* B-fix: capped shorter (was clamp(420px,52vw,620px)) so the dark stats
	   band sits at/just above the fold at 100% zoom. */
	height: clamp(340px, 40vw, 480px);
	overflow: hidden; /* A-fix: clip any residual overflow; stats band never overlapped */
	position: relative; /* normal-flow band; never overlapped by a sibling */
}

.hp-rental-mosaic--1 {
	grid-template-columns: 1fr; /* single large image */
}

.hp-rental-mosaic--empty {
	grid-template-columns: 1fr;
}

.hp-mosaic-cell {
	position: relative;
	display: block;
	overflow: hidden;
	border: 0;
	padding: 0;
	margin: 0;
	width: 100%;
	height: 100%;
	min-width: 0; /* A-fix: allow grid item to shrink below image intrinsic size */
	min-height: 0;
	background: #F0F0F0;
	cursor: pointer;
	border-radius: 0; /* edge-to-edge full-bleed tiles */
}

.hp-mosaic-cell img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.45s ease;
}

.hp-mosaic-cell:hover img,
.hp-mosaic-cell:focus-visible img {
	transform: scale(1.04);
}

.hp-mosaic-cell:focus-visible {
	outline: 3px solid #EEB211;
	outline-offset: 2px;
}

.hp-mosaic-grid {
	display: grid;
	gap: 8px;
	height: 100%;
	min-width: 0; /* A-fix: shrink with the band, never overflow */
	min-height: 0;
	overflow: hidden;
}

/* Per-count thumb layouts — never leave an empty tile. minmax(0,1fr) keeps
   tracks from growing to the images' intrinsic height (the overflow cause). */
.hp-rental-mosaic--5 .hp-mosaic-grid {
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
}
.hp-rental-mosaic--4 .hp-mosaic-grid {
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
}
.hp-rental-mosaic--4 .hp-mosaic-tile:first-child {
	grid-column: 1 / -1; /* wide top tile, two below */
}
.hp-rental-mosaic--3 .hp-mosaic-grid {
	grid-template-columns: minmax(0, 1fr);
	grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
}
.hp-rental-mosaic--2 .hp-mosaic-grid {
	grid-template-columns: minmax(0, 1fr);
	grid-template-rows: minmax(0, 1fr);
}

/* "View Gallery ->" overlay on the last tile (>=5 photos). */
.hp-mosaic-more-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(33, 34, 33, 0.55);
	transition: background-color 0.15s ease;
}

.hp-mosaic-tile--more:hover .hp-mosaic-more-overlay,
.hp-mosaic-tile--more:focus-visible .hp-mosaic-more-overlay {
	background: rgba(33, 34, 33, 0.66);
}

.hp-mosaic-more-label {
	font-family: 'Poppins', sans-serif;
	font-size: 16px;
	font-weight: 700;
	letter-spacing: 0.3px;
	color: #fff;
}

/* Mobile "View all N photos" pill — hidden on desktop. */
.hp-mosaic-viewall-mobile {
	display: none;
}

.hp-rental-photo-placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #212221;
	color: #B2B3B2;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 1.5px;
	font-size: 13px;
	border-radius: 0;
}

/* ---------- 2. STATS BAND (full-width dark box, Smith-style) ---------- */

.hp-rental-statsband {
	width: 100%;
	background: #212221; /* full-bleed dark box */
	position: relative; /* clean stacking; sits in normal flow below the mosaic */
}

.hp-rental-statsband-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 28px 24px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 20px 40px;
}

.hp-statsband-id {
	min-width: 0;
}

.hp-statsband-address {
	font-family: 'Poppins', sans-serif;
	font-size: 30px;
	font-weight: 700;
	color: #fff;
	line-height: 1.15;
	letter-spacing: -0.01em;
	margin: 0;
}

.hp-statsband-citystate {
	font-size: 16px;
	color: rgba(255, 255, 255, 0.7);
	margin: 6px 0 0;
}

.hp-statsband-stats {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
}

.hp-stat {
	font-size: 16px;
	color: rgba(255, 255, 255, 0.82);
	padding: 2px 22px;
	line-height: 1.3;
	border-left: 1px solid rgba(255, 255, 255, 0.18); /* subtle light divider */
}

.hp-stat:first-child {
	padding-left: 0;
	border-left: 0;
}

.hp-stat strong {
	color: #fff;
	font-weight: 700;
}

.hp-stat--rent {
	color: #EEB211;
	font-weight: 700;
}

/* ---------- 3. BODY — 60 / 40 ---------- */

.hp-rental-main {
	max-width: 1200px;
	margin: 0 auto;
	padding: 56px 24px;
	display: grid;
	grid-template-columns: 1.5fr 1fr; /* ~60 / 40 */
	gap: 56px;
	align-items: start;
	position: relative; /* contains the sticky action column's stacking */
}

.hp-rental-story {
	min-width: 0;
}

.hp-rental-section {
	margin: 0 0 40px;
}

.hp-rental-section:last-child {
	margin-bottom: 0;
}

.hp-rental-section h2 {
	font-family: 'Poppins', sans-serif;
	font-size: 26px;
	font-weight: 700;
	color: #212221;
	margin: 0 0 18px;
	letter-spacing: -0.01em;
}

.hp-rental-prose {
	font-size: 16px;
	line-height: 1.8;
	color: #444;
}

.hp-rental-amenities ul {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px 28px;
}

.hp-rental-amenities li {
	font-size: 15px;
	color: #444;
	padding-left: 26px;
	position: relative;
	line-height: 1.6;
}

.hp-rental-amenities li:before {
	content: '\2713';
	position: absolute;
	left: 0;
	top: 1px;
	color: #EEB211;
	font-weight: 700;
}

/* RIGHT — sticky action column (no card box; editorial whitespace) */
.hp-rental-actions {
	position: sticky;
	top: 24px;
}

.hp-rental-actions-rent {
	font-size: 30px;
	font-weight: 700;
	color: #EEB211;
	line-height: 1;
	margin: 0 0 8px;
}

.hp-rental-avail-line {
	font-size: 15px;
	color: #5A5A5A;
	margin: 0 0 22px;
}

.hp-rental-cta-stack {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-bottom: 8px;
}

.hp-rental-schedule-cta {
	display: block;
	background: #EEB211;
	color: #212221 !important;
	font-size: 16px;
	font-weight: 600;
	padding: 15px 28px;
	border-radius: 8px;
	text-decoration: none !important;
	text-align: center;
	transition: background-color 0.15s ease, transform 0.15s ease;
}

.hp-rental-schedule-cta:hover,
.hp-rental-schedule-cta:focus {
	background: #D9A410;
	color: #212221 !important;
}

.hp-rental-apply-cta {
	display: block;
	background: transparent;
	color: #C69100 !important;
	font-size: 16px;
	font-weight: 600;
	padding: 13px 26px;
	border: 2px solid #EEB211;
	border-radius: 8px;
	text-decoration: none !important;
	text-align: center;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.hp-rental-apply-cta:hover,
.hp-rental-apply-cta:focus {
	background: #EEB211;
	color: #212221 !important;
}

.hp-rental-unavailable-statement {
	font-family: 'Poppins', sans-serif;
	font-size: 26px;
	font-weight: 700;
	color: #212221;
	line-height: 1.2;
	border-left: 4px solid #EEB211;
	padding: 8px 0 8px 16px;
	margin: 4px 0 8px;
}

.hp-rental-contact {
	margin-top: 32px;
	padding-top: 28px;
	border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.hp-rental-contact h3 {
	font-family: 'Poppins', sans-serif;
	font-size: 17px;
	font-weight: 700;
	color: #212221;
	margin: 0 0 14px;
}

.hp-rental-contact-line {
	font-size: 15px;
	line-height: 1.7;
	color: #444;
	margin: 0 0 10px;
}

.hp-rental-contact-line:last-child {
	margin-bottom: 0;
}

.hp-rental-contact-line a {
	color: #C69100;
	text-decoration: none;
	font-weight: 600;
}

.hp-rental-contact-line a:hover {
	color: #EEB211;
}

/* ---------- 4. NEIGHBORHOOD ---------- */

.hp-rental-nearby {
	width: 100%;
	background: #F8F8F8;
}

.hp-rental-nearby-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 72px 24px;
}

.hp-rental-nearby h2 {
	font-family: 'Poppins', sans-serif;
	font-size: 30px;
	font-weight: 700;
	color: #212221;
	margin: 0 0 6px;
	letter-spacing: -0.01em;
}

.hp-rental-area-name {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: #EEB211;
	margin: 0 0 20px;
}

.hp-rental-area-blurb {
	font-size: 17px;
	line-height: 1.8;
	color: #444;
	max-width: 760px;
	margin: 0 0 36px;
}

.hp-rental-map-address {
	font-size: 15px;
	color: #5A5A5A;
	margin: 0 0 16px;
}

.hp-rental-map-container {
	width: 100%;
}

.hp-rental-map-iframe {
	width: 100%;
	height: 420px;
	border: 0;
	display: block;
	border-radius: 12px;
}

.hp-rental-map-fallback {
	font-size: 16px;
	margin: 0;
}

.hp-rental-map-fallback a {
	color: #5A5A5A;
	text-decoration: none;
	font-weight: 600;
	border-bottom: 1px solid #B2B3B2;
	padding-bottom: 2px;
	transition: color 0.15s ease, border-color 0.15s ease;
}

.hp-rental-map-fallback a:hover {
	color: #EEB211;
	border-bottom-color: #EEB211;
}

/* ---------- 5. BACKLINK ---------- */

.hp-rental-back {
	max-width: 1200px;
	margin: 0 auto;
	padding: 44px 24px 80px;
	text-align: center;
}

.hp-rental-back a {
	font-size: 15px;
	color: #5A5A5A;
	text-decoration: none;
	font-weight: 600;
	border-bottom: 1px solid transparent;
	padding-bottom: 2px;
	transition: color 0.15s ease, border-color 0.15s ease;
}

.hp-rental-back a:hover {
	color: #EEB211;
	border-bottom-color: #EEB211;
}

/* ---------- Fallback (missing data) ---------- */

.hp-rental-fallback {
	max-width: 800px;
	text-align: center;
	padding: 80px 20px;
	font-size: 18px;
	color: #5A5A5A;
}

.hp-rental-fallback a {
	color: #EEB211;
	font-weight: 600;
}

/* ---------- LIGHTBOX ---------- */

.hp-rental-lightbox {
	position: fixed;
	inset: 0;
	z-index: 9999;
	background: rgba(17, 17, 17, 0.94);
	display: none;
}

.hp-rental-lightbox.is-open {
	display: flex;
	align-items: center;
	justify-content: center;
}

.hp-rental-lightbox-swiper {
	width: 100%;
	height: 100%;
	max-width: 1400px;
}

.hp-rental-lightbox-swiper .swiper-slide {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 48px 64px;
}

.hp-rental-lightbox-swiper .swiper-slide img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	display: block;
	border-radius: 4px;
}

.hp-lightbox-close {
	position: absolute;
	top: 18px;
	right: 22px;
	z-index: 3;
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	font-size: 30px;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.hp-lightbox-close:hover,
.hp-lightbox-close:focus-visible {
	background: rgba(255, 255, 255, 0.24);
}

.hp-rental-lightbox-swiper .swiper-button-prev,
.hp-rental-lightbox-swiper .swiper-button-next {
	color: #fff;
}

.hp-rental-lightbox-swiper .swiper-pagination {
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	bottom: 18px;
}

/* ---------- Mobile sticky-bottom CTA bar ---------- */

.hp-rental-mobile-cta {
	display: none;
}

/* ---------- Mobile breakpoint (<=768px) ---------- */

@media (max-width: 768px) {
	/* Mosaic collapses to the single large photo + "View all N photos". */
	.hp-rental-mosaic {
		grid-template-columns: 1fr;
		height: clamp(240px, 58vw, 340px); /* B-fix: shorter so stats band reaches the fold */
		padding: 0;
		margin: 0;
	}
	.hp-mosaic-grid {
		display: none;
	}
	.hp-mosaic-viewall-mobile {
		display: inline-flex;
		align-items: center;
		position: absolute;
		left: 14px;
		bottom: 14px;
		z-index: 2;
		background: rgba(33, 34, 33, 0.78);
		color: #fff;
		font-family: 'Poppins', sans-serif;
		font-size: 13px;
		font-weight: 600;
		padding: 9px 16px;
		border-radius: 24px;
	}

	.hp-rental-statsband-inner {
		flex-direction: column;
		align-items: flex-start;
		gap: 16px;
		padding: 22px 16px;
	}
	.hp-statsband-address {
		font-size: 24px;
	}
	.hp-statsband-stats {
		gap: 4px 0;
	}
	.hp-stat {
		font-size: 15px;
		padding: 2px 14px;
	}

	.hp-rental-main {
		grid-template-columns: 1fr; /* right column stacks below left */
		gap: 40px;
		padding: 40px 16px;
	}
	.hp-rental-actions {
		position: static; /* no sticky on mobile */
	}
	.hp-rental-section h2 {
		font-size: 22px;
	}
	.hp-rental-amenities ul {
		grid-template-columns: 1fr;
	}

	.hp-rental-nearby-inner {
		padding: 48px 16px;
	}
	.hp-rental-nearby h2 {
		font-size: 24px;
	}
	.hp-rental-area-blurb {
		font-size: 16px;
	}
	.hp-rental-map-iframe {
		height: 300px;
	}

	.hp-rental-lightbox-swiper .swiper-slide {
		padding: 56px 16px;
	}

	/* Sticky-bottom CTA bar carrying the Schedule button. */
	.hp-rental-mobile-cta {
		display: block;
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 60;
		background: #fff;
		padding: 12px 16px;
		box-shadow: 0 -2px 14px rgba(0, 0, 0, 0.16);
	}
	.hp-rental-mobile-cta .hp-rental-schedule-cta {
		margin: 0;
	}
	.hp-rental-back {
		padding-bottom: 110px;
	}
}

/* ---------- C-fix: ShowMojo "Schedule a Showing" popup on top ----------
   ShowMojo injects a Bootstrap modal (.modal z-index:1055, .modal-backdrop
   z-index:1050) into a body-level wrapper. Those values are too low to clear
   site chrome reliably — the detail lightbox is z-9999, and Elementor sticky
   header/floating elements can outrank 1055 once scrolled. Force the modal +
   backdrop to the very top so the overlay always sits above everything. */
.modal-backdrop,
.modal-backdrop.show {
	z-index: 2147483646 !important;
}
.modal,
.modal.show {
	z-index: 2147483647 !important;
}
/* Bulletproof: while the ShowMojo modal is open (Bootstrap sets body.modal-open),
   drop the Elementor (sticky) header below the backdrop so it can never render
   over the popup — regardless of the sticky header's own z-index. */
body.modal-open .elementor-location-header,
body.modal-open header.elementor-location-header,
body.modal-open .elementor-sticky,
body.modal-open .elementor-sticky--active {
	z-index: 1 !important;
}
