/* =============================================================================
   Image Slider Widget
   ============================================================================= */

/* Outer wrapper */
.cew-image-slider {
	position: relative;
}

/* Peek mode — overflow visible so partial next slide shows */
.cew-image-slider--peek .cew-image-slider-carousel {
	overflow: visible;
}

/* Clip the peek to the widget boundary so it doesn't bleed across the page */
.cew-image-slider--peek {
	overflow: hidden;
}

/* The Swiper container */
.cew-image-slider-carousel {
	position: relative;
	overflow: hidden;
}

/* =============================================================================
   Image wrapper & aspect ratios
   ============================================================================= */

.cew-image-slider-img-wrapper {
	display: block;
	width: 100%;
	overflow: hidden;
	position: relative;
}

.cew-image-slider-img-wrapper a {
	display: block;
	width: 100%;
	height: 100%;
}

.cew-image-slider-img {
	display: block;
	width: 100%;
	height: auto;
	max-width: 100%;
}

/* Aspect ratio variants */
.cew-image-slider-ratio-1-1  { aspect-ratio: 1 / 1; }
.cew-image-slider-ratio-4-3  { aspect-ratio: 4 / 3; }
.cew-image-slider-ratio-3-2  { aspect-ratio: 3 / 2; }
.cew-image-slider-ratio-16-9 { aspect-ratio: 16 / 9; }
.cew-image-slider-ratio-2-1  { aspect-ratio: 2 / 1; }
.cew-image-slider-ratio-9-16 { aspect-ratio: 9 / 16; }

/* When aspect ratio is set, fill the container */
.cew-image-slider-ratio-1-1  .cew-image-slider-img,
.cew-image-slider-ratio-4-3  .cew-image-slider-img,
.cew-image-slider-ratio-3-2  .cew-image-slider-img,
.cew-image-slider-ratio-16-9 .cew-image-slider-img,
.cew-image-slider-ratio-2-1  .cew-image-slider-img,
.cew-image-slider-ratio-9-16 .cew-image-slider-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	position: absolute;
	top: 0;
	left: 0;
}

/* =============================================================================
   Arrows
   ============================================================================= */

.cew-image-slider-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	cursor: pointer;
	background-color: #ffffff;
	color: #000000;
	border-radius: 50%;
	box-shadow: 0 2px 10px rgba( 0, 0, 0, 0.15 );
	transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
	line-height: 1;
}

/* Hide the default Swiper arrow pseudo-element */
.cew-image-slider-arrow::after {
	display: none;
}

.cew-image-slider-prev {
	left: 12px;
}

.cew-image-slider-next {
	right: 12px;
}

.cew-image-slider-arrow.swiper-button-disabled {
	opacity: 0.35;
	pointer-events: none;
	cursor: default;
}

.cew-image-slider-arrow i {
	line-height: 1;
}

.cew-image-slider-arrow svg {
	display: block;
}

/* =============================================================================
   Pagination (dots)
   ============================================================================= */

.cew-image-slider-pagination {
	position: relative;
	bottom: auto;
	margin-top: 16px;
	text-align: center;
	line-height: 1;
}

.cew-image-slider .swiper-pagination-bullet {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #cccccc;
	opacity: 1;
	cursor: pointer;
	transition: background 0.2s ease;
}

.cew-image-slider .swiper-pagination-bullet-active {
	background: #000000;
}

/* =============================================================================
   Editor placeholder
   ============================================================================= */

.elementor-editor-active .cew-image-slider--peek {
	overflow: visible;
}
