.ecl-carousel-wrap {
	position: relative;
	margin: 18px auto;
	width: 100%;
}

.ecl-carousel-main {
	position: relative;
	overflow: hidden;
	border-radius: 12px;
}

/* Swiper flex slides default to min-width:auto; long captions can overflow into sibling slides without min-width:0. */
.ecl-carousel-main .swiper-slide.ecl-slide {
	min-width: 0;
	max-width: 100%;
	overflow: hidden;
	height: auto;
	box-sizing: border-box;
}

.ecl-slide-media {
	position: relative;
	display: block;
	overflow: hidden;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

.ecl-carousel-main .ecl-slide-media img {
	display: block;
	width: 100%;
	height: auto;
	object-fit: cover;
	cursor: pointer;
}

.ecl-carousel-wrap:not(.ecl-no-lightbox) .ecl-slide-caption {
	cursor: pointer;
}

.ecl-slide-caption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 12;
	margin: 0;
	padding: 18px 8px 12px;
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	font-size: 13px;
	line-height: 1.45;
	color: #fff;
	text-align: center;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9), 0 0 12px rgba(0, 0, 0, 0.55);
	background: linear-gradient(0deg, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.4) 45%, transparent 100%);
	pointer-events: auto;
	touch-action: pan-y;
	overscroll-behavior: contain;
	max-height: 48%;
	overflow-x: hidden;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	white-space: pre-wrap;
	word-wrap: break-word;
	overflow-wrap: anywhere;
	word-break: break-word;
	-webkit-user-select: text;
	user-select: text;
}

.ecl-carousel-wrap.ecl-no-lightbox .ecl-carousel-main .ecl-slide-media img {
	cursor: default;
}

.ecl-ratio-16-9 .ecl-slide-media img {
	aspect-ratio: 16 / 9;
}

.ecl-ratio-4-3 .ecl-slide-media img {
	aspect-ratio: 4 / 3;
}

.ecl-ratio-1-1 .ecl-slide-media img {
	aspect-ratio: 1 / 1;
}

.ecl-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.65);
	color: #fff;
	z-index: 20;
	cursor: pointer;
}

.ecl-nav::before {
	content: "";
	position: absolute;
	width: 10px;
	height: 10px;
	border-top: 2px solid #fff;
	border-right: 2px solid #fff;
	top: 50%;
	left: 50%;
}

.ecl-prev {
	left: 10px;
}

.ecl-prev::before {
	transform: translate(-30%, -50%) rotate(-135deg);
}

.ecl-next {
	right: 10px;
}

.ecl-next::before {
	transform: translate(-70%, -50%) rotate(45deg);
}

.ecl-lightbox-prev::before {
	transform: translate(-30%, -50%) rotate(-135deg);
}

.ecl-lightbox-next::before {
	transform: translate(-70%, -50%) rotate(45deg);
}

.ecl-lightbox {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.95);
	display: none;
	z-index: 99999;
	padding: 50px 16px 20px;
}

.ecl-lightbox.is-open {
	display: block;
}

.ecl-lightbox-swiper {
	width: 100%;
	height: calc(100vh - 120px);
	z-index: 1;
}

.ecl-lightbox .swiper-slide {
	display: flex;
	align-items: center;
	justify-content: center;
}

.ecl-lightbox .swiper-zoom-container {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	overflow: hidden;
	cursor: default;
}

.ecl-lightbox .swiper-zoom-container.ecl-can-zoom-in {
	cursor: zoom-in;
}

.ecl-lightbox .swiper-zoom-container.ecl-can-zoom-out {
	cursor: zoom-out;
}

.ecl-lightbox .swiper-zoom-container > picture {
	display: flex;
	align-items: center;
	justify-content: center;
	width: auto !important;
	height: 100% !important;
	max-width: 100% !important;
	max-height: 100% !important;
}

.ecl-lightbox .swiper-zoom-container > picture > img,
.ecl-lightbox .swiper-zoom-container > img,
.ecl-lightbox .swiper-zoom-container > svg,
.ecl-lightbox .swiper-zoom-container > canvas {
	width: auto !important;
	height: 100% !important;
	max-width: 100% !important;
	max-height: 100% !important;
	object-fit: contain !important;
	margin: 0 auto;
	transform-origin: center center;
	transition: transform 220ms ease-out;
	user-select: none;
	-webkit-user-drag: none;
}

.ecl-lightbox-close {
	position: absolute;
	top: 10px;
	right: 12px;
	background: transparent;
	color: #fff;
	border: 0;
	font-size: 38px;
	line-height: 1;
	cursor: pointer;
	z-index: 30;
	width: 44px;
	height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 8px;
}

.ecl-lightbox-close:hover,
.ecl-lightbox-close:focus {
	background: rgba(255, 255, 255, 0.18);
	outline: none;
}

.ecl-lightbox-prev {
	left: 14px;
}

.ecl-lightbox-next {
	right: 14px;
}

.ecl-lightbox-toolbar {
	position: absolute;
	bottom: 16px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	z-index: 30;
	max-width: min(720px, calc(100vw - 32px));
	padding: 0 8px;
	box-sizing: border-box;
}

.ecl-lightbox-toolbar-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	width: 100%;
	text-align: center;
}

.ecl-lightbox-caption {
	margin: 0;
	font-size: 13px;
	line-height: 1.45;
	color: rgba(255, 255, 255, 0.94);
	max-height: min(28vh, 200px);
	overflow-x: hidden;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	touch-action: pan-y;
	overscroll-behavior: contain;
	white-space: pre-wrap;
	word-wrap: break-word;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.ecl-lightbox-caption[hidden] {
	display: none !important;
}

/* Pagination sits below the slide area so it does not cover images (Swiper el may be outside .swiper). */
.ecl-pagination.swiper-pagination {
	position: relative !important;
	inset: auto !important;
	bottom: auto !important;
	left: auto !important;
	transform: none;
	width: 100% !important;
	max-width: 100%;
	margin: 10px 0 0;
	padding: 4px 0 0;
	box-sizing: border-box;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 8px;
	row-gap: 6px;
	background: transparent;
	backdrop-filter: none;
	pointer-events: none;
}

.ecl-pagination .swiper-pagination-bullet {
	flex: 0 0 auto;
	margin: 0 !important;
	width: 7px;
	height: 7px;
	opacity: 1;
	background: rgba(255, 255, 255, 0.5);
	border: 0;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.22), 0 1px 2px rgba(0, 0, 0, 0.12);
	transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
	pointer-events: auto;
	cursor: pointer;
}

.ecl-pagination .swiper-pagination-bullet-active {
	background: #fff;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.28), 0 1px 3px rgba(0, 0, 0, 0.18);
	transform: scale(1.12);
}

.ecl-counter {
	min-width: 70px;
	text-align: center;
	font-size: 14px;
}

@media (max-width: 767px) {
	.ecl-nav {
		width: 32px;
		height: 32px;
	}

	.ecl-slide-caption {
		padding: 14px 8px 10px;
		font-size: 12px;
		max-height: 45%;
	}

	.ecl-pagination.swiper-pagination {
		margin-top: 8px;
		padding-top: 2px;
		gap: 6px;
		row-gap: 5px;
	}

	.ecl-pagination .swiper-pagination-bullet {
		width: 6px;
		height: 6px;
	}

	.ecl-pagination .swiper-pagination-bullet-active {
		transform: scale(1.08);
	}
}
