.jwb-carousel {
	--carousel-height: 360px;
	--carousel-height-mobile: 240px;

	position: relative;
	width: 100%;
	overflow: hidden;
}

.jwb-carousel__viewport {
	width: 100%;
	overflow: hidden;
}

.jwb-carousel__track {
	display: flex;
	align-items: center;
	gap: 0;
	transition: transform 450ms ease;
	will-change: transform;
}

.jwb-carousel__track.no-transition {
	transition: none;
}

.jwb-carousel__track.no-transition .jwb-carousel__slide {
	transition: none;
}

.jwb-carousel__slide {
	flex: 0 0 auto;
	height: var(--carousel-height);
	opacity: 0.4;
	filter: saturate(45%);
	transition:
		opacity 300ms ease,
		filter 300ms ease;
}

.jwb-carousel__slide.is-active {
	opacity: 1;
	filter: saturate(100%);
}

.jwb-carousel__image,
.jwb-carousel__slide img {
	display: block;
	height: 100%;
	width: auto;
	max-width: none;
	object-fit: contain;
	border-radius: 0;
}

.jwb-carousel__arrow {
	position: absolute;
	top: 50%;
	z-index: 5;
	transform: translateY(-50%);
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.6);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-size: 1.5rem;
	line-height: 1;
	padding: 0;
}

.jwb-carousel__arrow:hover,
.jwb-carousel__arrow:focus {
	background: rgba(0, 0, 0, 0.8);
}

.jwb-carousel__arrow--prev {
	left: 16px;
}

.jwb-carousel__arrow--next {
	right: 16px;
}

.jwb-carousel__placeholder {
	border: 1px dashed #999;
	padding: 24px;
	text-align: center;
}

.jwb-carousel__editor-preview {
	overflow: hidden;
}

.jwb-carousel__editor-images {
	display: flex;
	align-items: center;
	gap: 0;
	overflow: hidden;
}

.jwb-carousel__editor-image {
	display: block;
	height: var(--carousel-height);
	width: auto;
	max-width: none;
	filter: saturate(45%);
	opacity: 0.4;
}

.jwb-carousel__editor-image:first-child {
	filter: saturate(100%);
	opacity: 1;
}

@media (max-width: 767px) {
	.jwb-carousel__slide,
	.jwb-carousel__editor-image {
		height: var(--carousel-height-mobile);
	}

	.jwb-carousel__arrow {
		width: 38px;
		height: 38px;
		font-size: 1.25rem;
	}
}
