/**
 * Listing Card Carousel — frontend styles.
 *
 * Zillow-style per-card photo carousel. Sizing/colours use CSS custom properties
 * with fixed defaults (the v1 card design is fixed; a future settings panel can
 * inject the same vars inline without a rebuild).
 */

.hplc-carousel {
	position: relative;
	overflow: hidden;
	/* Default: round the TOP corners only (bottom stays square so the card body
	   below can sit flush). This is just a default — Divi's Design tab > Border >
	   Rounded Corners is redirected to this element (module.json
	   styleProps.border.selector) and, being a higher-specificity order-class
	   rule, overrides this, including per-corner values. */
	border-radius: var( --hplc-radius, 8px ) var( --hplc-radius, 8px ) 0 0;
	height: var( --hplc-height, 180px );
	background: #eef0f2;
	margin-bottom: 10px;
}

.hplc-viewport {
	height: 100%;
	overflow: hidden;
}

.hplc-track {
	display: flex;
	height: 100%;
	transition: transform 0.35s ease;
	will-change: transform;
}

.hplc-slide {
	flex: 0 0 100%;
	height: 100%;
	display: block;
	line-height: 0;
}

.hplc-img {
	width: 100%;
	height: 100%;
	object-fit: var( --hplc-fit, cover );
	display: block;
}

/* Arrows — hover-reveal on fine pointers; hidden on touch (swipe instead). */
.hplc-arrow {
	position: absolute;
	top: 50%;
	transform: translateY( -50% );
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	color: var( --hplc-arrow-color, #ffffff );
	background: var( --hplc-arrow-bg, rgba( 0, 0, 0, 0.45 ) );
	opacity: 0;
	transition: opacity 0.2s ease, background 0.2s ease;
	z-index: 2;
}

.hplc-carousel:hover .hplc-arrow {
	opacity: 1;
}

.hplc-arrow:hover {
	background: var( --hplc-arrow-bg-hover, rgba( 0, 0, 0, 0.7 ) );
}

.hplc-arrow.hplc-prev {
	left: 8px;
}

.hplc-arrow.hplc-next {
	right: 8px;
}

.hplc-arrow[disabled] {
	opacity: 0 !important;
	pointer-events: none;
}

@media ( hover: none ) {
	.hplc-arrow {
		display: none;
	}
}

/* Dots */
.hplc-dots {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 8px;
	display: flex;
	justify-content: center;
	gap: 5px;
	z-index: 2;
}

.hplc-dot {
	width: 6px;
	height: 6px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	background: var( --hplc-dot, #ffffff );
	opacity: 0.55;
	box-shadow: 0 0 2px rgba( 0, 0, 0, 0.4 );
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.hplc-dot.is-active {
	opacity: 1;
	transform: scale( 1.35 );
}

/* Single-photo card: no sliding. */
.hplc-static .hplc-track {
	transition: none;
}
