/*
 * Listen wie im alten Theme (_typo.scss, ui/list.scss, blocks/list.scss, magazine/single/blocks/*.scss).
 * Seiten: grüner Gedankenstrich. Magazinbeiträge: grüner Balken, nummerierte Listen mit grünem Kreis.
 * Stile: Checkliste (Haken), Kreuzliste (avoidlist), Strichliste (bulletlist), Schritte, Steckbrief (theme.json).
 */

:where(.wp-block-list) {
	margin: 0;
	padding: 0;
}

ul.wp-block-list:not([class*="is-style-"]) {
	list-style: none;
}

ul.wp-block-list:not([class*="is-style-"]) > li {
	margin: 0 0 5px 30px;
	font-size: 18px;
	line-height: 32px;
	letter-spacing: 0.45px;
}

ul.wp-block-list:not([class*="is-style-"]) > li::before {
	content: "-";
	position: relative;
	top: 5px;
	margin: 0 10px 0 -30px;
	color: var(--wp--preset--color--gruen);
	font-size: 200%;
	line-height: 0;
}

@media (min-width: 960px) {
	ul.wp-block-list:not([class*="is-style-"]) > li {
		margin-bottom: 20px;
	}
}

/* Checkliste und Kreuzliste */
ul.is-style-checklist,
ul.is-style-avoidlist {
	margin: 0;
	padding: 0 0 0 2rem;
	list-style: none;
}

ul.is-style-checklist > li,
ul.is-style-avoidlist > li {
	position: relative;
	margin-bottom: 1rem;
	font-size: 18px;
	line-height: 32px;
	letter-spacing: 0.45px;
}

ul.is-style-checklist > li::before,
ul.is-style-avoidlist > li::before {
	content: "";
	position: absolute;
	top: 6px;
	left: -2rem;
	width: 20px;
	height: 20px;
	background-color: var(--wp--preset--color--gruen);
	-webkit-mask: url(../../icons/haken.svg) center / contain no-repeat;
	mask: url(../../icons/haken.svg) center / contain no-repeat;
}

ul.is-style-avoidlist > li::before {
	top: 8px;
	width: 18px;
	height: 18px;
	-webkit-mask: none;
	mask: none;
	background: url(../../img/kreuz.svg) center / contain no-repeat;
}

/* Strichliste: grüner Balken */
ul.is-style-bulletlist {
	margin: 0;
	padding: 0;
	list-style: none;
}

ul.is-style-bulletlist > li {
	position: relative;
	margin: 0 0 10px 30px;
	font-size: 18px;
	line-height: 32px;
	letter-spacing: 0.45px;
}

ul.is-style-bulletlist > li::before,
.single-post .wp-block-post-content ul.wp-block-list:not([class*="is-style-"]) > li::before {
	content: "";
	position: absolute;
	top: 15px;
	left: -30px;
	width: 18px;
	height: 3px;
	margin: 0;
	background: var(--wp--preset--color--gruen);
}

/* Magazin: Balken statt Strich, Fließtext 16 px */
.single-post .wp-block-post-content ul.wp-block-list:not([class*="is-style-"]) > li {
	position: relative;
	font-size: 16px;
}

/* Magazin: nummerierte Listen mit grünem Kreis */
.single-post .wp-block-post-content ol.wp-block-list {
	padding: 0 0 0 40px;
	list-style: none;
	counter-reset: vd-zaehler;
}

.single-post .wp-block-post-content ol.wp-block-list > li {
	position: relative;
	margin-bottom: 20px;
	font-size: 16px;
	counter-increment: vd-zaehler;
}

.single-post .wp-block-post-content ol.wp-block-list > li::before {
	content: counter(vd-zaehler);
	position: absolute;
	top: 4px;
	left: -38px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--wp--preset--color--gruen);
	color: var(--wp--preset--color--schwarz);
	font-size: 13px;
	font-weight: 600;
	line-height: 22px;
	text-align: center;
}

@media (min-width: 960px) {
	.single-post .wp-block-post-content ol.wp-block-list > li {
		margin-bottom: 30px;
		font-size: 18px;
	}
}

@media (max-width: 1024px) {
	ul.is-style-checklist > li,
	ul.is-style-avoidlist > li,
	ul.is-style-bulletlist > li {
		font-size: 16px;
		line-height: 1.5;
		letter-spacing: 0.4px;
	}

	ul.is-style-checklist > li::before {
		top: 2px;
	}
}

/* ---------------------------------------------------------------- Schritte (steps is-list)
 * Grundform in theme.json (Variante „schritte“): Kreis 40 px, Text 60 px eingerückt, 50 px zwischen den Schritten,
 * Zeilenhöhe 32 px wie alt mobil. Ab 960 px wie alt .steps: 80 % der Inhaltsbreite (936 px) und mittig, also bündig mit
 * den eingerückten Texten darüber, Zeilenhöhe 1,4; Kreis und Strichellinie dazu passend 3 px höher (live gemessen). */
/* Schritte mit Überschrift und Trennlinie (Landingpages, alt .step h3 und hr): Überschrift ohne Abstand darunter,
 * Linie unsichtbar, nur Abstand (0,5 em darüber, 1,5 em darunter). */
ol.is-style-schritte > li > :is(h2, h3, h4) {
	margin: 0;
	line-height: 1.3;
}

ol.is-style-schritte > li > hr {
	height: 1px;
	margin: 0.5em 0 1.5em;
	border: 0;
}

@media (min-width: 960px) {
	ol.is-style-schritte > li > :is(h2, h3, h4) {
		line-height: 50px;
	}

	ol.is-style-schritte {
		max-width: calc(var(--wp--style--global--content-size) * 0.8) !important;
		margin-inline: auto !important;
	}

	ol.is-style-schritte > li {
		line-height: 1.4;
	}

	ol.is-style-schritte > li::before {
		top: -8px;
	}

	ol.is-style-schritte > li:not(:last-child)::after {
		top: 32px;
		bottom: -42px;
	}
}

/* ---------------------------------------------------------------- Schritte als Pfad (steps is-path)
 * Mobil: grüne Balken. Ab 960 px Zickzack: Schritte absolut positioniert, grüne Verbindungslinien, Fähnchen-Icon.
 * Positionen und Linien je Umbruchpunkt aus scss/modules/components/steps.scss. */
ol.is-style-pfad {
	position: relative;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* oben 3 px: alt stand der Balken als 3 px hoher Block im Fluss (position: relative) über dem Text */
ol.is-style-pfad > li {
	position: relative;
	padding: 3px 0 20px 30px;
	font-size: 16px;
	line-height: 25px;
}

ol.is-style-pfad > li::before {
	content: "";
	position: absolute;
	top: 10px;
	left: 0;
	width: 18px;
	height: 3px;
	background: var(--wp--preset--color--gruen);
}

@media (min-width: 960px) {
	ol.is-style-pfad:has(> li:nth-child(1)) { height: 150px; }
	ol.is-style-pfad:has(> li:nth-child(2)) { height: 300px; }
	ol.is-style-pfad:has(> li:nth-child(3)) { height: 450px; }
	ol.is-style-pfad:has(> li:nth-child(4)) { height: 600px; }
	ol.is-style-pfad:has(> li:nth-child(5)) { height: 750px; }

	ol.is-style-pfad > li {
		position: absolute;
		width: 350px;
		min-height: 200px;
		padding: 0;
		font-size: 18px;
		line-height: 32px;
	}

	ol.is-style-pfad > li::before {
		height: 1px;
	}

	ol.is-style-pfad > li:first-child::before {
		display: none;
	}

	ol.is-style-pfad > li::after {
		content: "";
		position: absolute;
		top: 15%;
		width: 24px;
		height: 24px;
		background-color: var(--wp--preset--color--schwarz);
		-webkit-mask: url(../../icons/flagge.svg) center / contain no-repeat;
		mask: url(../../icons/flagge.svg) center / contain no-repeat;
	}

	ol.is-style-pfad > li:nth-child(odd)::after { right: -12%; }
	ol.is-style-pfad > li:nth-child(even)::after { left: -14%; }

	ol.is-style-pfad > li:nth-child(1) { left: 10%; top: 0; }
	ol.is-style-pfad > li:nth-child(2) { right: 0; top: 75px; }
	ol.is-style-pfad > li:nth-child(3) { left: 0; top: 225px; }
	ol.is-style-pfad > li:nth-child(4) { right: 10%; top: 300px; }
	ol.is-style-pfad > li:nth-child(5) { left: 15%; top: 525px; width: 300px; }

	ol.is-style-pfad > li:nth-child(2)::before { width: 263px; left: -305px; top: 13px; transform: rotate(16deg); }
	ol.is-style-pfad > li:nth-child(3)::before { width: 393px; left: auto; right: -407px; top: -26px; transform: rotate(-22deg); }
	ol.is-style-pfad > li:nth-child(4)::before { width: 265px; left: -305px; top: 14px; transform: rotate(17deg); }
	ol.is-style-pfad > li:nth-child(5)::before { width: 260px; left: auto; right: -220px; top: -64px; transform: rotate(-58deg); }
}

@media (min-width: 1025px) {
	ol.is-style-pfad > li:nth-child(2)::before { width: 169px; left: -207px; top: 17px; transform: rotate(26deg); }
	ol.is-style-pfad > li:nth-child(3)::before { width: 294px; right: -299px; top: -22px; transform: rotate(-31deg); }
	ol.is-style-pfad > li:nth-child(4)::before { width: 169px; left: -205px; top: 17px; transform: rotate(27deg); }
	ol.is-style-pfad > li:nth-child(5)::before { width: 230px; right: -162px; top: -58px; transform: rotate(-77deg); }
}

@media (min-width: 1440px) {
	ol.is-style-pfad > li:nth-child(2)::before { width: 290px; left: -332px; top: 17px; transform: rotate(15deg); }
	ol.is-style-pfad > li:nth-child(3)::before { width: 426px; right: -437px; top: -21px; transform: rotate(-21deg); }
	ol.is-style-pfad > li:nth-child(4)::before { width: 292px; left: -333px; top: 17px; transform: rotate(15deg); }
	ol.is-style-pfad > li:nth-child(5)::before { width: 275px; right: -238px; top: -58px; transform: rotate(-54deg); }
}

/* Inhaltsverzeichnis von Hand (alt ul/ol.gutenberg__list--toc, 4 Beiträge): grüner Winkel statt Strich, Einträge
 * halbfett 18 px, nicht unterstrichen, darüber grün; 18 px Abstand. Selektor wie die Magazin-Regeln oben, damit er
 * sie überschreibt. */
.single-post .wp-block-post-content :is(ul, ol).wp-block-list.gutenberg__list--toc {
	padding-left: 0;
	counter-reset: none;
}

.single-post .wp-block-post-content :is(ul, ol).wp-block-list.gutenberg__list--toc > li {
	position: relative;
	margin: 0 0 18px 30px;
	font-size: 18px;
	font-weight: 600;
	line-height: 32px;
}

.single-post .wp-block-post-content :is(ul, ol).wp-block-list.gutenberg__list--toc > li::before {
	content: "";
	position: absolute;
	top: 12px;
	left: -30px;
	width: 14px;
	height: 14px;
	margin: 0;
	border-radius: 0;
	background: var(--wp--preset--color--gruen);
	-webkit-mask: url(../../icons/winkel-rechts.svg) center / contain no-repeat;
	mask: url(../../icons/winkel-rechts.svg) center / contain no-repeat;
}

.single-post .wp-block-post-content :is(ul, ol).wp-block-list.gutenberg__list--toc a {
	color: var(--wp--preset--color--schwarz);
	text-decoration: none;
}

.single-post .wp-block-post-content :is(ul, ol).wp-block-list.gutenberg__list--toc a:is(:hover, :focus-visible) {
	color: var(--wp--preset--color--gruen);
}
