.wp-block-post-template-scroller-header {
	align-items: center;
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	gap: 1rem;
}

.wp-block-post-template-scroller-footer {
	align-items: center;
	display: flex;
	flex-direction: row;
	justify-content: center;
	gap: 1rem;
}

.wp-block-post-template-scroller-footer:has(.wp-block-post-template-scroller-arrows) {
	justify-content: space-between;
}

.wp-block-post-template-scroller-arrows {
	display: flex;
}

.wp-block-post-template-scroller-arrow {
	align-items: center;
	border: 1px solid #000;
	display: flex;
	justify-content: center;
	padding-inline: 1ch;
}

.wp-block-post-template-scroller-arrow-left {
	border-right-width: 0;
	padding-right: 0.5ch;
}

.wp-block-post-template-scroller-arrow-right {
	border-left-width: 0;
	padding-left: 0.5ch;
}

.wp-block-post-template-scroller-pagination {
	display: flex;
	gap: 0.5rem;
}

.wp-block-post-template-scroller-pagination-dot {
	background-color: #000;
	border-radius: 50%;
	display: block;
	height: 0.5em;
	width: 0.5em;
}

.wp-block-post-template-scroller-header + .wp-block-post-template {
	--amount-slides: 1;
	--row-gap: var(--wp--style--block-gap, 1rem);
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: nowrap !important;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
}

.wp-block-post-template-scroller-header + .wp-block-post-template > * {
	--slide-width: 100%;
	box-sizing: border-box;
	max-width: 100%;
	min-width: 100%;
	scroll-snap-align: start;
}

.wp-block-post-template-scroller-header + .wp-block-post-template.columns-16 > *,
.wp-block-post-template-scroller-header + .wp-block-post-template.columns-15 > *,
.wp-block-post-template-scroller-header + .wp-block-post-template.columns-14 > *,
.wp-block-post-template-scroller-header + .wp-block-post-template.columns-13 > *,
.wp-block-post-template-scroller-header + .wp-block-post-template.columns-12 > *,
.wp-block-post-template-scroller-header + .wp-block-post-template.columns-11 > *,
.wp-block-post-template-scroller-header + .wp-block-post-template.columns-10 > *,
.wp-block-post-template-scroller-header + .wp-block-post-template.columns-9 > *,
.wp-block-post-template-scroller-header + .wp-block-post-template.columns-8 > *,
.wp-block-post-template-scroller-header + .wp-block-post-template.columns-7 > *,
.wp-block-post-template-scroller-header + .wp-block-post-template.columns-6 > *,
.wp-block-post-template-scroller-header + .wp-block-post-template.columns-5 > *,
.wp-block-post-template-scroller-header + .wp-block-post-template.columns-4 > *,
.wp-block-post-template-scroller-header + .wp-block-post-template.columns-3 > *,
.wp-block-post-template-scroller-header + .wp-block-post-template.columns-2 > * {
	--slide-width: calc(100% / var(--amount-slides) + var(--row-gap) / var(--amount-slides));
}

@media screen and (min-width: 600px) {

	.wp-block-post-template-scroller-header + .wp-block-post-template.columns-16,
	.wp-block-post-template-scroller-header + .wp-block-post-template.columns-15,
	.wp-block-post-template-scroller-header + .wp-block-post-template.columns-14,
	.wp-block-post-template-scroller-header + .wp-block-post-template.columns-13,
	.wp-block-post-template-scroller-header + .wp-block-post-template.columns-12,
	.wp-block-post-template-scroller-header + .wp-block-post-template.columns-11,
	.wp-block-post-template-scroller-header + .wp-block-post-template.columns-10,
	.wp-block-post-template-scroller-header + .wp-block-post-template.columns-9,
	.wp-block-post-template-scroller-header + .wp-block-post-template.columns-8,
	.wp-block-post-template-scroller-header + .wp-block-post-template.columns-7,
	.wp-block-post-template-scroller-header + .wp-block-post-template.columns-6,
	.wp-block-post-template-scroller-header + .wp-block-post-template.columns-5,
	.wp-block-post-template-scroller-header + .wp-block-post-template.columns-4,
	.wp-block-post-template-scroller-header + .wp-block-post-template.columns-3 {
		--amount-slides: 2;
	}

	.wp-block-post-template-scroller-header + .wp-block-post-template.is-layout-grid:not(.columns-1) > * {
		max-width: calc(var(--slide-width, 100%) - var(--row-gap));
		min-width: calc(var(--slide-width, 100%) - var(--row-gap));
	}
}

@media screen and (min-width: 782px) {

	.wp-block-post-template-scroller-header + .wp-block-post-template.columns-16 {
		--amount-slides: 16;
	}

	.wp-block-post-template-scroller-header + .wp-block-post-template.columns-15 {
		--amount-slides: 15;
	}

	.wp-block-post-template-scroller-header + .wp-block-post-template.columns-14 {
		--amount-slides: 14;
	}

	.wp-block-post-template-scroller-header + .wp-block-post-template.columns-13 {
		--amount-slides: 13;
	}

	.wp-block-post-template-scroller-header + .wp-block-post-template.columns-12 {
		--amount-slides: 12;
	}

	.wp-block-post-template-scroller-header + .wp-block-post-template.columns-11 {
		--amount-slides: 11;
	}

	.wp-block-post-template-scroller-header + .wp-block-post-template.columns-10 {
		--amount-slides: 10;
	}

	.wp-block-post-template-scroller-header + .wp-block-post-template.columns-9 {
		--amount-slides: 9;
	}

	.wp-block-post-template-scroller-header + .wp-block-post-template.columns-8 {
		--amount-slides: 8;
	}

	.wp-block-post-template-scroller-header + .wp-block-post-template.columns-7 {
		--amount-slides: 7;
	}

	.wp-block-post-template-scroller-header + .wp-block-post-template.columns-6 {
		--amount-slides: 6;
	}

	.wp-block-post-template-scroller-header + .wp-block-post-template.columns-5 {
		--amount-slides: 5;
	}

	.wp-block-post-template-scroller-header + .wp-block-post-template.columns-4 {
		--amount-slides: 4;
	}

	.wp-block-post-template-scroller-header + .wp-block-post-template.columns-3 {
		--amount-slides: 3;
	}

	.wp-block-post-template-scroller-header + .wp-block-post-template.columns-2 {
		--amount-slides: 2;
	}
}
