/**
 * Components Typography (Hero Compact und Editorial Text)
 *
 * Basis-Typografie für Hero Compact und Editorial Text:
 *
 * 1. Fließtext/Paragraphen auf 1rem (line-height 1.625)
 * 2. Vertikale Abstände zwischen losen Paragraphen, Headings, Listen etc.
 *
 * Alle Regeln sind OHNE !important und mit minimaler Spezifität (:where)
 * geschrieben. Die spezifischen Pattern-Styles gewinnen dadurch weiterhin.
 *
 * Scope: ausschließlich .hs-hero-compact und .hs-editorial-text.
 *
 * @package Hundeschule_TT5_Child
 * @since 1.0.1
 */

:where(.hs-hero-compact, .hs-editorial-text) {
	--hs-text-font-size: 1rem;
	--hs-text-line-height: 1.625;
	--hs-text-flow-space: 1.25rem;
	--hs-text-heading-space: 2rem;
	--hs-text-heading-space-bottom: 0.75rem;
}

/* ==========================================================================
   1. Fließtext auf 1rem
   ========================================================================== */

:where(.hs-hero-compact, .hs-editorial-text) :where(p, li, dd, dt, figcaption) {
	font-size: var(--hs-text-font-size);
	line-height: var(--hs-text-line-height);
}

/* ==========================================================================
   2. Abstände zwischen losen Textblöcken im Post-Content
   ========================================================================== */

:where(.hs-hero-compact, .hs-editorial-text) > :where(p, ul, ol, dl, blockquote, .wp-block-list, .wp-block-quote) {
	margin-top: 0;
	margin-bottom: var(--hs-text-flow-space);
}

:where(.hs-hero-compact, .hs-editorial-text) > :where(h1, h2, h3, h4, h5, h6, .wp-block-heading) {
	margin-top: var(--hs-text-heading-space);
	margin-bottom: var(--hs-text-heading-space-bottom);
}

/* ==========================================================================
   3. Listen
   ========================================================================== */

/* Einzug + Abstand zwischen den List-Items.
   Nur redaktionelle Listen (List-Block oder klassenlos) – Komponenten-Listen
   mit hs-Klassen, Query Loops (wp-block-post-template) etc. bleiben unangetastet. */
:where(.hs-hero-compact, .hs-editorial-text) :where(ul, ol):where(.wp-block-list, :not([class])):where(:not([class*='hs-'])) {
	padding-left: 1.5rem;
}

:where(.hs-hero-compact, .hs-editorial-text) :where(ul, ol):where(.wp-block-list, :not([class])):where(:not([class*='hs-'])) > :where(li + li) {
	margin-top: 0.5rem;
}

/* Verschachtelte Listen */
:where(.hs-hero-compact, .hs-editorial-text) :where(ul, ol):where(.wp-block-list, :not([class])):where(:not([class*='hs-'])) :where(ul, ol) {
	margin-top: 0.5rem;
	margin-bottom: 0;
}
