/*
 * Bildband (Stil „fcp-bildband“ des Galerie-Blocks): eine waagerechte Reihe, drei Bilder auf breiten Bildschirmen,
 * zwei auf mittleren, eins (mit Anschnitt des nächsten) auf dem Handy. Höhe wie beim früheren Slider der Agentur.
 * Die Auswahl ist spezifischer als die Breitenregel des Galerie-Blocks (…:not(#individual-image)).
 */
.wp-block-gallery.has-nested-images.is-style-fcp-bildband {
	--fcp-bildband-luecke: 8px;
	--fcp-bildband-hoehe: 250px;
	display: flex;
	flex-wrap: nowrap;
	gap: var(--fcp-bildband-luecke);
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	margin-left: 0;
	margin-right: 0;
}

.wp-block-gallery.has-nested-images.is-style-fcp-bildband::-webkit-scrollbar {
	display: none;
}

.wp-block-gallery.has-nested-images.is-style-fcp-bildband figure.wp-block-image:not(#individual-image) {
	flex: 0 0 calc((100% - 2 * var(--fcp-bildband-luecke)) / 3);
	width: auto;
	height: var(--fcp-bildband-hoehe);
	margin: 0;
	scroll-snap-align: start;
}

/* Auch gegen „is-cropped“ des Galerie-Blocks (height: 100% mit :not(#individual-image)). */
.wp-block-gallery.has-nested-images.is-style-fcp-bildband figure.wp-block-image:not(#individual-image) img {
	width: 100%;
	height: var(--fcp-bildband-hoehe);
	object-fit: cover;
}

@media (max-width: 900px) {
	.wp-block-gallery.has-nested-images.is-style-fcp-bildband figure.wp-block-image:not(#individual-image) {
		flex-basis: calc((100% - var(--fcp-bildband-luecke)) / 2);
	}
}

@media (max-width: 600px) {
	.wp-block-gallery.has-nested-images.is-style-fcp-bildband {
		--fcp-bildband-hoehe: 220px;
	}

	.wp-block-gallery.has-nested-images.is-style-fcp-bildband figure.wp-block-image:not(#individual-image) {
		flex-basis: 85%;
	}
}

.wp-block-gallery.has-nested-images.is-style-fcp-bildband:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 4px;
}

/* Rahmen mit Pfeilen, vom Skript um den Bildband gelegt. */
.fcp-bildband {
	position: relative;
	margin-block: 1.5em;
}

.fcp-bildband > .wp-block-gallery {
	margin-block: 0;
}

/* Am Anfang oder Ende eines Abschnitts sorgt dessen Innenabstand für Luft. */
.wp-block-group__inner-container > .fcp-bildband:first-child {
	margin-top: 0;
}

.wp-block-group__inner-container > .fcp-bildband:last-child {
	margin-bottom: 0;
}

.fcp-bildband-pfeil {
	position: absolute;
	top: 50%;
	z-index: 2;
	width: 44px;
	height: 44px;
	margin-top: -22px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.92);
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
	color: #222;
	font-size: 26px;
	line-height: 44px;
	text-align: center;
	cursor: pointer;
}

.fcp-bildband-pfeil:hover,
.fcp-bildband-pfeil:focus-visible {
	background: #fff;
}

.fcp-bildband-pfeil[disabled] {
	opacity: 0;
	pointer-events: none;
}

.fcp-bildband-zurueck {
	left: 8px;
}

.fcp-bildband-weiter {
	right: 8px;
}

.fcp-bildband-pfeil[hidden] {
	display: none;
}

@media (prefers-reduced-motion: reduce) {
	.wp-block-gallery.has-nested-images.is-style-fcp-bildband {
		scroll-behavior: auto;
	}
}
