/*
 * CritViews: farbige Hinweis-Boxen und aufklappbare Spoiler (Frontend und Block-Editor).
 * Farben passend zum Theme (dunkler Hintergrund, Rot #e62429, Grau). Die Textfarbe kommt vom Theme.
 * Nutzt --cvgh-accent, falls das Theme die Variable setzt.
 */

.cv-box {
	--cv-red: var(--cvgh-accent, #e62429);
	--cv-box-color: #a0a0a0;
	border-left: 4px solid var(--cv-box-color);
	background: rgba(127, 127, 127, 0.1);
	border-radius: 4px;
	padding: 14px 18px;
	margin: 1.5em 0;
}

.cv-box > :first-child,
.cv-box > .wp-block-group__inner-container > :first-child {
	margin-top: 0;
}

.cv-box > :last-child,
.cv-box > .wp-block-group__inner-container > :last-child {
	margin-bottom: 0;
}

.cv-box strong:first-child {
	color: var(--cv-box-color);
	text-transform: uppercase;
	letter-spacing: 0.03em;
	font-size: 0.92em;
}

/* Tipp: ruhiges Grau. */
.cv-box--tipp {
	--cv-box-color: #a0a0a0;
}

/* Wichtig: rote Kante. */
.cv-box--wichtig {
	--cv-box-color: var(--cv-red);
	background: rgba(230, 36, 41, 0.08);
}

/* Verpassbar: rot umrandet und kräftiger, damit es sofort auffällt. */
.cv-box--verpassbar {
	--cv-box-color: var(--cv-red);
	border: 2px solid var(--cv-red);
	border-left-width: 6px;
	background: rgba(230, 36, 41, 0.14);
}

/* Spoiler-Warnung: Grau gestrichelt. */
.cv-box--spoiler {
	--cv-box-color: #a0a0a0;
	border: 1px dashed #a0a0a0;
	border-left: 4px solid #a0a0a0;
	background: rgba(127, 127, 127, 0.06);
}

details.cv-spoiler {
	border: 1px dashed #a0a0a0;
	border-radius: 4px;
	padding: 12px 18px;
	margin: 1.5em 0;
	background: rgba(127, 127, 127, 0.06);
}

details.cv-spoiler > summary {
	cursor: pointer;
	font-weight: 700;
	list-style-position: inside;
}

details.cv-spoiler > summary::marker {
	color: var(--cvgh-accent, #e62429);
}

details.cv-spoiler[open] > summary {
	margin-bottom: 0.8em;
}

details.cv-spoiler > :last-child {
	margin-bottom: 0;
}

/* Inhaltsverzeichnis von Rank Math: nur H2 anzeigen. Gilt auch für ältere Artikel, deren Verzeichnis noch H3 enthält. */
.wp-block-rank-math-toc-block nav li > ul,
.wp-block-rank-math-toc-block nav li > ol {
	display: none;
}
