/*------------------------------------------------------------
	Carousel — horizontal slides, optional arrows and dot nav
	Root: `.st-carousel` with optional `data-st-carousel-interval`,
	`data-st-carousel-pause-hover`. Behavior: `carousel.js`.
------------------------------------------------------------*/

.st-carousel {
	width: 100%;
	max-width: 100%;
	overflow: hidden;
}

.st-carousel__viewport {
	display: flex;
	align-items: stretch;
	gap: 0.25rem;
	width: 100%;
	min-width: 0;
}

/* Scrollport: must have a definite width so each slide can be 100% of it */
.st-carousel__slides {
	display: flex;
	flex: 1 1 0;
	min-width: 0;
	width: 100%;
	margin: 0;
	padding: 0;
	list-style: none;
	flex-wrap: nowrap;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	/* Touch: native horizontal pan + momentum (flick). Desktop: arrows/dots/autoplay only. */
	touch-action: pan-x;
	overscroll-behavior-x: contain;
	scrollbar-width: none; /* Firefox */
	-ms-overflow-style: none; /* IE / legacy Edge */
}

.st-carousel__slides::-webkit-scrollbar {
	display: none; /* Chrome, Safari, Opera */
}

.st-carousel__slide {
	flex: 0 0 100%;
	/* 100% of scrollport width — do not use min-width:0 here or slides shrink and the track grows sideways */
	min-width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	scroll-snap-align: start;
	scroll-snap-stop: always;
}

/* Keep card content from forcing the slide wider than the viewport */
.st-carousel__slide > * {
	min-width: 0;
	max-width: 100%;
}

.st-carousel__arrow {
	display: inline-flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	align-self: center;
	margin: 0;
	padding: 0.25rem 0.35rem;
	border: 1px solid var(--st-color--border, #cbd5e1);
	border-radius: var(--st-radius--md, 0.5rem);
	background: var(--st-color--background, #fff);
	color: var(--st-color--text, #0f172a);
	cursor: pointer;
	line-height: 1;
}

.st-carousel__arrow:hover,
.st-carousel__arrow:focus-visible {
	border-color: var(--st-color--border-hover, #64748b);
	outline: none;
}

.st-carousel__arrow .dashicons {
	width: 1.5rem;
	height: 1.5rem;
	font-size: 1.5rem;
}

.st-carousel__dots {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem;
	margin-top: 0.75rem;
}

.st-carousel__dot {
	width: 0.5rem;
	height: 0.5rem;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: var(--st-color--gray-400, #94a3b8);
	cursor: pointer;
	line-height: 0;
	transition: background-color 0.15s ease, transform 0.15s ease;
}

.st-carousel__dot:hover,
.st-carousel__dot:focus-visible {
	background: var(--st-color--gray-600, #475569);
	outline: none;
}

.st-carousel__dot--active {
	background: var(--st-color--accent, var(--st-color--accent-1, #2271b1));
	transform: scale(1.15);
}
