/**
 * Single property mobile fixes:
 * - Similar listings: hide stacked gallery slides until Slick is ready
 * - Map pin: pointer cursor
 */

/* Prevent all gallery images stacking before / without Slick */
#similar-listings-wrap .houzez-listing-carousel:not(.slick-initialized) > .slide-img:not(:first-child),
.similar-property-wrap .houzez-listing-carousel:not(.slick-initialized) > .slide-img:not(:first-child) {
	display: none !important;
}

#similar-listings-wrap .listing-gallery-wrap,
#similar-listings-wrap .listing-image-wrap,
.similar-property-wrap .listing-gallery-wrap,
.similar-property-wrap .listing-image-wrap {
	overflow: hidden;
	position: relative;
}

/* If Slick miscalculates height on first card, clip to one frame */
@media (max-width: 991px) {
	#similar-listings-wrap .listing-image-wrap,
	.similar-property-wrap .listing-image-wrap {
		aspect-ratio: 4 / 3;
		max-height: none;
	}

	#similar-listings-wrap .listing-image-wrap img,
	.similar-property-wrap .listing-image-wrap img {
		width: 100%;
		height: 100%;
		object-fit: cover;
	}

	#similar-listings-wrap .houzez-listing-carousel.slick-initialized .slick-list,
	.similar-property-wrap .houzez-listing-carousel.slick-initialized .slick-list {
		overflow: hidden !important;
	}
}

[id^="houzez-single-listing-map"] .leaflet-marker-icon,
[id^="houzez-single-listing-map"] .mapboxgl-marker,
[id^="houzez-single-listing-map"] .gm-marker,
[id^="houzez-single-listing-map"] .osm-marker,
[id^="houzez-overview-listing-map"] .leaflet-marker-icon,
[id^="houzez-overview-listing-map"] .mapboxgl-marker {
	cursor: pointer !important;
}

/* Map tab: ensure container has size on mobile (avoids grey/blank map) */
#pills-map .map-wrap,
#pills-map #houzez-single-listing-map,
.property-banner #houzez-single-listing-map {
	min-height: 280px;
	width: 100%;
}

/* UCSS often drops .tab-pane.show — map tab stays display:none */
.tab-pane.show,
.tab-pane.active.show,
.tab-pane.active {
	display: block !important;
}

.property-banner #pills-map .leaflet-container {
	width: 100% !important;
	height: 100% !important;
	min-height: 280px;
	background: #e5e3df;
}

@media (max-width: 991px) {
	.property-banner #pills-map.show,
	.property-banner #pills-map.active {
		display: block !important;
		min-height: 280px;
		height: 100%;
	}

	.property-banner #pills-map .map-wrap,
	.property-banner #pills-map #houzez-single-listing-map {
		min-height: 280px;
		height: 100%;
	}

	.property-banner #pills-map .leaflet-container,
	.property-banner #pills-map .mapboxgl-map,
	.property-banner #pills-map .gm-style {
		min-height: 280px;
		height: 100% !important;
	}
}
