/* Real Estate Manager — property carousel.
 *
 * Structural rules only. Every visual value the Property Carousel widget
 * exposes as a control (arrow size/colours/border/radius, dot colours and
 * size, dot spacing) is set from that control's default, never here, so
 * the panel always wins regardless of stylesheet load order.
 */

.linkify-re-carousel-wrap {
	position: relative;
}

.linkify-re-carousel {
	position: relative;
	overflow: hidden;
	width: 100%;
}

.linkify-re-carousel__track {
	display: flex;
	box-sizing: content-box;
	position: relative;
	width: 100%;
	height: 100%;
}

/* Before Swiper runs, keep the stacked slides from flashing — the same job
   Elementor's own anti-flicker rule does, but keyed to a class that is
   actually removed. */
.linkify-re-carousel:not(.swiper-initialized):not(.is-native) .linkify-re-carousel__track {
	overflow: hidden;
}

/* Once Swiper is running the track MUST NOT clip. The track is the element
   Swiper translates, so its clip window travels with it: a clipping track
   hides every slide that is not sitting at offset zero, which looks like a
   correctly sized carousel that paints nothing. !important is deliberate —
   this defends against third-party stylesheets (Elementor's included) that
   clip `.swiper-wrapper` via selectors that never stop matching. */
.linkify-re-carousel.swiper-initialized .linkify-re-carousel__track {
	overflow: visible !important;
}

.linkify-re-carousel__slide {
	flex-shrink: 0;
	height: auto;
	display: flex;
	box-sizing: border-box;
}

/* Swiper overrides this inline once it has measured the container. The
   fallback matters when Swiper's own stylesheet is not on the page: without
   a width the slides collapse and the carousel renders as an empty strip. */
.linkify-re-carousel:not(.is-native) .linkify-re-carousel__slide {
	width: 100%;
}

/* Cards keep their own look from front.css; they only need to fill the
   slide and stretch to equal height. */
.linkify-re-carousel__slide > .linkify-re-property-card {
	width: 100%;
	display: flex;
	flex-direction: column;
}

.linkify-re-carousel__slide .linkify-re-property-card__body {
	flex: 1 1 auto;
}

/* Arrows ------------------------------------------------------------- */

.linkify-re-carousel__arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	cursor: pointer;
	box-sizing: border-box;
	transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.linkify-re-carousel__arrow--prev {
	left: -18px;
}

.linkify-re-carousel__arrow--next {
	right: -18px;
}

.linkify-re-carousel__arrow.is-disabled {
	opacity: 0.35;
	pointer-events: none;
}

@media (max-width: 1024px) {

	.linkify-re-carousel__arrow--prev {
		left: 4px;
	}

	.linkify-re-carousel__arrow--next {
		right: 4px;
	}
}

/* Dots --------------------------------------------------------------- */

.linkify-re-carousel__dots {
	position: static;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
}

.linkify-re-carousel__dots .swiper-pagination-bullet,
.linkify-re-carousel__dots .linkify-re-carousel__dot {
	display: inline-block;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
}

/* Fallback: native scroll-snap when Swiper is not on the page --------- */

.linkify-re-carousel.is-native {
	overflow: visible;
}

.linkify-re-carousel.is-native .linkify-re-carousel__track {
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	gap: var(--linkify-re-carousel-gap, 24px);
	padding-bottom: 8px;
	scrollbar-width: none;
}

.linkify-re-carousel.is-native .linkify-re-carousel__track::-webkit-scrollbar {
	display: none;
}

.linkify-re-carousel.is-native .linkify-re-carousel__slide {
	scroll-snap-align: start;
	width: calc(
		(100% - (var(--linkify-re-carousel-cols, 3) - 1) * var(--linkify-re-carousel-gap, 24px))
		/ var(--linkify-re-carousel-cols, 3)
	);
}

/* Editor-only diagnostic shown when a carousel comes back empty --------- */

.linkify-re-no-results--admin {
	max-width: 640px;
	margin: 8px auto 0;
	padding: 10px 14px;
	border: 1px dashed #c3c4c7;
	border-radius: 6px;
	background: #fcfcfc;
	color: #646970;
	font-size: 13px;
	line-height: 1.5;
	text-align: center;
}
