/* ── KOA Carousel — shared scroll-snap carousel ── */

.koa-carousel {
	position: relative;
}

.koa-carousel__track {
	display: flex;
	gap: 1rem;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	padding-bottom: 0.5rem;
}

.koa-carousel__track::-webkit-scrollbar {
	display: none;
}

.koa-carousel__track > * {
	scroll-snap-align: start;
	flex-shrink: 0;
}

/* ── Nav arrows ── */

.koa-carousel__nav {
	display: none;
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 50%;
	border: var(--wp--custom--border-width--tiny, 1px) solid var(--wp--preset--color--border);
	background: var(--wp--custom--color--surface-2);
	color: var(--wp--preset--color--foreground);
	cursor: pointer;
	align-items: center;
	justify-content: center;
	transition: border-color 300ms ease, background-color 300ms ease;
	padding: 0;
	z-index: 2;
}

.koa-carousel__nav:hover {
	border-color: var(--wp--preset--color--primary-text);
	background: var(--wp--preset--color--secondary);
}

.koa-carousel__nav--prev {
	left: 0;
}

.koa-carousel__nav--next {
	right: 0;
}

@media (min-width: 768px) {
	.koa-carousel--has-overflow > .koa-carousel__nav {
		display: flex;
	}

	/* Reserve an internal gutter so the edge-pinned arrows sit beside the track
	   rather than outside the container. Prevents horizontal overflow at widths
	   where the page gutter is narrower than the arrows. */
	.koa-carousel--has-overflow {
		padding-left: 3rem;
		padding-right: 3rem;
	}
}
