/**
 * Zultner Theme – Editor-Styles.
 * Spiegelt die Front-End-Block-Styles im Block-Editor.
 */

.editor-styles-wrapper .wp-block-heading.is-style-zultner-underline mark,
.editor-styles-wrapper .wp-block-heading.is-style-zultner-underline .zultner-hl {
	background-color: transparent;
	background-image: linear-gradient(
		transparent 55%,
		var( --wp--preset--color--brand-yellow ) 55%
	);
	padding: 0 0.05em;
}

.editor-styles-wrapper .wp-block-group.is-style-zultner-card {
	background-color: var( --wp--preset--color--light-grey );
	border-radius: 2px;
}

.editor-styles-wrapper .wp-block-image.is-style-zultner-product {
	background-color: var( --wp--preset--color--light-grey );
}

.editor-styles-wrapper .is-style-zultner-arrow-link a::after,
.editor-styles-wrapper .is-style-zultner-arrow-link::after {
	content: " →";
}

/*
 * Werte-Slider im Canvas: Gutenberg macht InnerBlocks zu display:contents,
 * daher greift theme.css `.zultner-slider__track > *` (33%-Basis) nicht.
 * Nur die Slide-Gruppen (Kinder des Tracks) bekommen die Basis – nicht
 * Kachel / Titel / Text darin.
 */
.editor-styles-wrapper .zultner-slider__track,
.editor-styles-wrapper .zultner-slider__track.is-layout-flex,
.editor-styles-wrapper .zultner-slider__track .is-layout-flex,
.editor-styles-wrapper .zultner-slider__track .block-editor-block-list__layout {
	align-items: flex-start !important;
	flex-wrap: nowrap !important;
}

.editor-styles-wrapper .zultner-slider__track,
.editor-styles-wrapper .zultner-slider__track > .block-editor-inner-blocks > .block-editor-block-list__layout {
	display: flex !important;
	flex-direction: row !important;
	overflow-x: auto !important;
	scroll-snap-type: x mandatory;
}

.editor-styles-wrapper .zultner-slider__track > .block-editor-inner-blocks > .block-editor-block-list__layout > .wp-block,
.editor-styles-wrapper .zultner-slider__track .block-editor-block-list__layout > .wp-block:has( .zultner-kachel-gelb ):has( .wp-block-heading ) {
	flex: 0 0 calc( ( 100% - 64px ) / 3 ) !important;
	min-width: calc( ( 100% - 64px ) / 3 ) !important;
	max-width: none !important;
	align-self: flex-start !important;
	margin-block: 0 !important;
	scroll-snap-align: start;
}

/*
 * alignfull + constrained: Kinder im Canvas sonst volle Editorbreite.
 * Pfeile müssen wie im FE am rechten Rand der 1320px-Spalte sitzen.
 */
.editor-styles-wrapper .zultner-slider.is-layout-constrained > .block-editor-inner-blocks > .block-editor-block-list__layout > .wp-block,
.editor-styles-wrapper .zultner-slider.alignfull > .block-editor-inner-blocks > .block-editor-block-list__layout > .wp-block {
	max-width: var( --wp--style--global--content-size, 1320px ) !important;
	width: 100% !important;
	margin-left: auto !important;
	margin-right: auto !important;
}

.editor-styles-wrapper .zultner-slider-nav {
	margin-left: auto !important;
	width: max-content !important;
	justify-content: flex-end !important;
}

.editor-styles-wrapper .zultner-slider .block-library-html__preview-overlay {
	pointer-events: none !important;
}

.editor-styles-wrapper .zultner-slider .block-library-html__preview {
	justify-content: flex-end !important;
	align-items: flex-start !important;
	min-height: 40px !important;
}

.editor-styles-wrapper .zultner-slider [data-type="core/html"],
.editor-styles-wrapper .zultner-slider .wp-block-html {
	width: 81px !important;
	max-width: 81px !important;
	min-height: 40px !important;
	height: 40px !important;
	margin-left: auto !important;
}

.editor-styles-wrapper .zultner-slider [data-type="core/html"] iframe,
.editor-styles-wrapper .zultner-slider .block-library-html__preview iframe {
	width: 81px !important;
	height: 40px !important;
	min-height: 40px !important;
	pointer-events: auto !important;
	position: relative;
	z-index: 2;
}
