.wp-block-nanshanwan-post-carousel.nsw-post-carousel {
	box-sizing: border-box;
	width: 100%;
	max-width: 980px;
	margin-right: auto;
	margin-left: auto;
}

.wp-block-nanshanwan-post-carousel.nsw-post-carousel.alignwide,
.wp-block-nanshanwan-post-carousel.nsw-post-carousel.alignfull {
	max-width: none;
}

.nsw-post-carousel *,
.nsw-post-carousel *::before,
.nsw-post-carousel *::after {
	box-sizing: border-box;
}

.nsw-post-carousel__thumbs-row {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	width: 100%;
	margin-bottom: 8px;
}

.nsw-post-carousel__thumbs {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 2px;
	max-width: min(100%, 680px);
	overflow-x: auto;
	overflow-y: hidden;
	scrollbar-width: thin;
	-webkit-overflow-scrolling: touch;
}

.nsw-post-carousel__thumb,
.nsw-post-carousel__arrow {
	border: 0;
	appearance: none;
	cursor: pointer;
}

.nsw-post-carousel__thumb {
	position: relative;
	flex: 0 0 70px;
	width: 70px;
	height: 70px;
	padding: 2px;
	border: 2px solid transparent;
	border-radius: 0;
	background: transparent;
	transition: border-color 0.24s ease, transform 0.24s ease, box-shadow 0.24s ease;
}

.nsw-post-carousel__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: 0;
	object-fit: fill;
}

.nsw-post-carousel__thumb:hover,
.nsw-post-carousel__thumb:focus-visible {
	border-color: rgba(1, 140, 188, 0.55);
	box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
	outline: none;
	transform: translateY(-1px);
}

.nsw-post-carousel__thumb.is-active {
	border-color: #018cbc;
	box-shadow: 0 0 0 1px rgba(1, 140, 188, 0.18);
}

.nsw-post-carousel__arrow {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 34px;
	width: 34px;
	height: 34px;
	padding: 0;
	border-radius: 50%;
	color: #018cbc;
	font-size: 30px;
	font-weight: 700;
	line-height: 1;
	background: rgba(255, 255, 255, 0.88);
	transition: color 0.24s ease, background 0.24s ease, transform 0.24s ease, opacity 0.24s ease;
}

.nsw-post-carousel__arrow i {
	display: block;
	line-height: 1;
}

.nsw-post-carousel__arrow:hover,
.nsw-post-carousel__arrow:focus-visible {
	color: #ffffff;
	background: #018cbc;
	outline: none;
	transform: translateY(-1px);
}

.nsw-post-carousel__arrow:disabled {
	cursor: not-allowed;
	opacity: 0.35;
	transform: none;
}

.nsw-post-carousel__stage {
	position: relative;
	width: 100%;
	max-width: 850px;
	margin: 0 auto;
	border-radius: 0;
	aspect-ratio: var(--nsw-post-carousel-aspect-ratio, 16 / 9);
	overflow: hidden;
	touch-action: pan-y;
}

.nsw-post-carousel__stage[style*="auto"],
.nsw-post-carousel[style*="--nsw-post-carousel-aspect-ratio:auto"] .nsw-post-carousel__stage {
	aspect-ratio: auto;
}

.nsw-post-carousel__slide {
	position: absolute;
	inset: 0;
	z-index: 0;
	margin: 0;
	margin-top: 0;
	opacity: 0;
	visibility: hidden;
	transform: translateX(18px) scale(1.01);
	transition: opacity 0.36s ease, transform 0.36s ease, visibility 0.36s ease;
}

.nsw-post-carousel__slide.is-active {
	z-index: 1;
	opacity: 1;
	visibility: visible;
	transform: translateX(0) scale(1);
}

.nsw-post-carousel[data-animation="none"] .nsw-post-carousel__slide,
.nsw-post-carousel[data-animation="fade"] .nsw-post-carousel__slide {
	transform: none;
}

.nsw-post-carousel[data-animation="none"] .nsw-post-carousel__slide {
	transition: none;
}

.nsw-post-carousel__image {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: 0;
	object-fit: var(--nsw-post-carousel-object-fit, cover);
}

.nsw-post-carousel[style*="--nsw-post-carousel-aspect-ratio:auto"] .nsw-post-carousel__slide {
	position: static;
	display: none;
}

.nsw-post-carousel[style*="--nsw-post-carousel-aspect-ratio:auto"] .nsw-post-carousel__slide.is-active {
	display: block;
}

.nsw-post-carousel[style*="--nsw-post-carousel-aspect-ratio:auto"] .nsw-post-carousel__image {
	height: auto;
}

@media (max-width: 1199px) {
	.wp-block-nanshanwan-post-carousel.nsw-post-carousel {
		max-width: 860px;
	}

	.nsw-post-carousel__thumbs-row {
		gap: 10px;
		margin-bottom: 8px;
	}

	.nsw-post-carousel__thumb {
		flex-basis: 70px;
		width: 70px;
		height: 70px;
	}
}

@media (max-width: 767px) {
	.wp-block-nanshanwan-post-carousel.nsw-post-carousel {
		max-width: 100%;
	}

	.nsw-post-carousel__thumbs-row {
		justify-content: flex-start;
		gap: 8px;
		margin-bottom: 8px;
	}

	.nsw-post-carousel__thumbs {
		justify-content: flex-start;
		max-width: calc(100% - 88px);
		gap: 6px;
	}

	.nsw-post-carousel__thumb {
		flex-basis: 70px;
		width: 70px;
		height: 70px;
	}

	.nsw-post-carousel__arrow {
		flex-basis: 36px;
		width: 36px;
		height: 36px;
		font-size: 30px;
	}

	.nsw-post-carousel__stage {
		max-width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.nsw-post-carousel *,
	.nsw-post-carousel *::before,
	.nsw-post-carousel *::after {
		transition: none !important;
		animation: none !important;
	}
}
