:root {
	--roeser-active-menu-color: currentColor;
	--roeser-onepager-active-color: var(--roeser-active-menu-color);
	--roeser-onepager-scroll-offset: 120px;
}

/* OnePager: aktiver Link aus dem Scroll-Spy. */
body.home.roeser-onepager-enabled li.ds-menu-active > a,
body.home.roeser-onepager-enabled a.ds-link-active {
	text-decoration-line: underline !important;
	text-decoration-color: var(--roeser-active-menu-color) !important;
	text-decoration-thickness: 0.2em !important;
	text-underline-offset: 0.6em !important;
}

/*
 * Mehrseitige Website: Nur der tatsächlich aktuelle Menüeintrag wird markiert.
 * Die Selektoren sind absichtlich unabhängig von Desktop-/Mobile-Divi-Klassen.
 */
.roeser-multipage-enabled .current-menu-item > a,
.roeser-multipage-enabled .current_page_item > a,
.roeser-multipage-enabled a[aria-current="page"] {
	text-decoration-line: underline !important;
	text-decoration-color: var(--roeser-active-menu-color) !important;
	text-decoration-thickness: 0.2em !important;
	text-underline-offset: 0.6em !important;
}

/* Fallback für interne OnePager-Ankerlinks. */
html {
	scroll-behavior: auto;
}

html:has(body.roeser-onepager-enabled) {
	scroll-behavior: smooth;
}

/* Verhindert Leerzeilen nach der Ausgabe eines nicht befüllten Shortcodes. */
.et_pb_text_inner > p:empty { display: none !important; }
.et_pb_text:has(> .et_pb_text_inner:empty),
.et_pb_text:has(> .et_pb_text_inner > p:only-child:empty) { display: none !important; }

/* Überschriften-Abstände innerhalb des Plugin-Impressums sowie der
 * einzeln eingesetzten Rechtsblöcke; andere Seitenüberschriften bleiben unberührt. */
.rwt-impressum h2,
.rwt-impressum h3,
.rwt-legal-block > h3 {
	padding-top: 1.4em !important;
}
.rwt-impressum h4,
.rwt-legal-subfield > h4 {
	padding-top: 1em !important;
}

/* Abstand nach jedem ausgegebenen Bildnachweis-Block. */
.rwt-image-credit {
	padding-bottom: 1em;
}
