/**
 * KOGIT — shared RichText / body copy styles (frontend + editor).
 *
 * Links (gray / orange hover) + dash / numbered lists.
 * Fracktif has no italic cut — <em>/<i> must not faux-oblique (CD-Check 2026-11-09).
 *
 * Lists: Figma Lagebild 861:12979 (en-dash U+2013, item gap 20, glyph gap 10).
 */

/*
 * No faux italic — Fracktif Light/Regular only (CD P1).
 * Markup (<em>) stays; visual slant is removed.
 */
.kogit-rte-body em,
.kogit-rte-body i,
.kogit-pb__article em,
.kogit-pb__article i,
.kogit-cb__article em,
.kogit-cb__article i,
.kogit-ic__body em,
.kogit-ic__body i,
.kogit-ic__aside-body em,
.kogit-ic__aside-body i,
[class*="kogit-"] .kogit-rte-body em,
[class*="kogit-"] .kogit-rte-body i,
ul.kogit-rte-list em,
ul.kogit-rte-list i,
ol.kogit-rte-list em,
ol.kogit-rte-list i {
	font-style: normal;
}

/*
 * Body RichText inline links — gray at rest, no underline; orange hover (all viewports).
 * Same pattern as __muted / impressum a.kogit-ic__muted.
 */
a.kogit-rte-link,
[class*="kogit-"] a.kogit-rte-link {
	color: var(--wp--preset--color--gray, #9b9b9b);
	text-decoration: none;
	cursor: pointer;
}

a.kogit-rte-link:hover,
a.kogit-rte-link:focus-visible,
[class*="kogit-"] a.kogit-rte-link:hover,
[class*="kogit-"] a.kogit-rte-link:focus-visible {
	color: var(--wp--preset--color--orange, #ff3e00);
	text-decoration: none;
}

/*
 * Shared body RichText lists
 * Bullets = Figma Lagebild 861:12979 (en-dash U+2013, glyph width + gap 10)
 * Numbers ≈ Govern Challenges
 * Prefer classes stamped on <ul>/<ol> (kogit_blocks_normalize_body_lists);
 * keep .kogit-rte-body as fallback for wrappers from render_body().
 * Also post/case article content (.kogit-pb__article / .kogit-cb__article).
 */
.kogit-rte-body ul,
.kogit-rte-body ol,
.kogit-pb__article ul,
.kogit-pb__article ol,
.kogit-cb__article ul,
.kogit-cb__article ol,
ul.kogit-rte-list,
ol.kogit-rte-list {
	list-style: none !important;
	list-style-type: none !important;
	margin: 0 0 0.75em;
	padding: 0;
	display: flex;
	flex-direction: column;
	align-items: stretch;
}

/* Bullet lists — en-dash + 20px between items */
.kogit-rte-body ul,
.kogit-pb__article ul,
.kogit-cb__article ul,
ul.kogit-rte-list--bullets {
	gap: var(--kogit-innerer-abstand-20, 20px);
}

.kogit-rte-body ul > li,
.kogit-pb__article ul > li,
.kogit-cb__article ul > li,
ul.kogit-rte-list--bullets > li {
	/*
	 * Do NOT use display:flex + gap on the <li>.
	 * protected-words wraps keywords in <span class="kogit-kw">; flex would
	 * put 10px between every text node / span (Jobs accordion blowout).
	 * Dash via absolute + padding so copy stays normal inline flow.
	 */
	position: relative;
	display: block;
	box-sizing: border-box;
	margin: 0;
	/* 1em dash slot + 10px gap (Figma Lagebild 861:12980) */
	padding: 0 0 0 calc(1em + 10px);
	list-style: none !important;
	/* Default to body copy typography; .kogit-type-* on li still wins */
	font-family: inherit;
	font-size: var(--kogit-type-copy-size, 18px);
	font-weight: var(--kogit-type-copy-weight, 300);
	letter-spacing: var(--kogit-type-copy-tracking, 0);
	line-height: var(--kogit-type-copy-lh, 24px);
}

.kogit-rte-body ul > li::marker,
.kogit-rte-body ol > li::marker,
.kogit-pb__article ul > li::marker,
.kogit-pb__article ol > li::marker,
.kogit-cb__article ul > li::marker,
.kogit-cb__article ol > li::marker,
ul.kogit-rte-list > li::marker,
ol.kogit-rte-list > li::marker {
	content: none;
	font-size: 0;
}

.kogit-rte-body ul > li::before,
.kogit-pb__article ul > li::before,
.kogit-cb__article ul > li::before,
ul.kogit-rte-list--bullets > li::before {
	/* En-dash U+2013 — Figma Lagebild 861:12980 */
	content: "\2013";
	position: absolute;
	left: 0;
	top: 0;
	box-sizing: border-box;
	width: 1em;
	margin: 0;
	padding: 0;
	font: inherit;
	font-size: inherit;
	font-weight: inherit;
	line-height: inherit;
	pointer-events: none;
}

/* TinyMCE wraps li text in <p> — keep Figma-tight stack */
.kogit-rte-body ul > li > p,
.kogit-pb__article ul > li > p,
.kogit-cb__article ul > li > p,
ul.kogit-rte-list--bullets > li > p {
	margin: 0;
}

/* Numbered lists — gap ≈ Govern; type size from Style dropdown on li */
.kogit-rte-body ol,
.kogit-pb__article ol,
.kogit-cb__article ol,
ol.kogit-rte-list--numbers {
	gap: 40px;
	counter-reset: kogit-rte-ol;
}

.kogit-rte-body ol > li,
.kogit-pb__article ol > li,
.kogit-cb__article ol > li,
ol.kogit-rte-list--numbers > li {
	/* Same as bullets: no flex on <li> (kogit-kw / text nodes must stay inline). */
	position: relative;
	display: block;
	margin: 0;
	/* ~1.25em number + 0.35em gap */
	padding: 0 0 0 calc(1.25em + 0.35em);
	list-style: none !important;
	/* Default to body copy typography; .kogit-type-* on li still wins */
	font-family: inherit;
	font-size: var(--kogit-type-copy-size, 18px);
	font-weight: var(--kogit-type-copy-weight, 300);
	letter-spacing: var(--kogit-type-copy-tracking, 0);
	line-height: var(--kogit-type-copy-lh, 24px);
	counter-increment: kogit-rte-ol;
}

.kogit-rte-body ol > li::before,
.kogit-pb__article ol > li::before,
.kogit-cb__article ol > li::before,
ol.kogit-rte-list--numbers > li::before {
	content: counter(kogit-rte-ol) ". ";
	position: absolute;
	left: 0;
	top: 0;
	box-sizing: border-box;
	min-width: 1.25em;
	font: inherit;
	font-size: inherit;
	font-weight: inherit;
	line-height: inherit;
	pointer-events: none;
}

.kogit-rte-body ol > li > p,
.kogit-pb__article ol > li > p,
.kogit-cb__article ol > li > p,
ol.kogit-rte-list--numbers > li > p {
	margin: 0;
}
