/**********************************
 *
 *    ROSEN LEXIKON – FRONTEND (seit 1.1.0, Spalten und Animation seit 1.2.0, Links und Tooltip seit 1.3.0)
 *
 *    1. A–Z-Leiste (Glossar-Seite und Begriffsseiten)
 *    2. Suchfeld (Live-Suche, assets/js/rlx-search.js)
 *    3. Gruppen und Einträge des Index ([rosen_lexikon]): Raster mit 3 / 2 / 1 Spalten, Kacheln
 *    4. Animation beim Filtern (nur mit JavaScript, Klasse rlx-index--js; aus bei „Bewegung reduzieren“)
 *    5. Mobil
 *    6. Automatische Links (a.rlx-link, includes/class-rlx-linkify.php) und Tooltip (assets/js/rlx-tooltip.js;
 *       seit 1.3.5 position: fixed)
 *
 *    Farben und Schrift wie Theme „Rosenbrauerei“ (css/custom.css): Rot #d41217, Text #333,
 *    Hind Guntur. Sprungmarken: scroll-margin-top gleicht den festen Kopfbereich aus
 *    (≥ 991 px fixiert per script.js ab 100 px Scrollhöhe, ≤ 768 px immer fixiert).
 *
 ***********************************/

/* 1. A–Z-LEISTE */
.rlx-az {margin: 0 0 30px;}
.rlx-az__liste {display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; margin: 0; padding: 0; list-style: none;}
.rlx-az__eintrag {margin: 0; padding: 0; list-style: none;}
.rlx-az__link {display: inline-block; min-width: 1.1em; font-size: 26px; font-weight: 700; line-height: 1.4; text-align: center; text-decoration: none;}
a.rlx-az__link {color: #333;}
a.rlx-az__link:hover,
a.rlx-az__link:focus,
a.rlx-az__link--aktuell {color: #d41217; text-decoration: underline;}
a.rlx-az__link:focus-visible {outline: 2px solid #d41217; outline-offset: 2px;}
.rlx-az__link--leer {color: #bbb; cursor: default;}

/* 2. SUCHFELD */
.rlx-suche {max-width: 480px; margin: 0 auto 40px; text-align: left;}
.rlx-suche[hidden] {display: none;}
.rlx-suche__label {display: block; margin-bottom: 4px; font-size: 16px; font-weight: 700; color: #333;}
.rlx-suche__feld {width: 100%; padding: 6px 2px; font-size: 22px; color: #333;}
.rlx-suche__feld:focus-visible {outline: 2px solid #d41217; outline-offset: 2px;}
.rlx-suche__status {min-height: 1.4em; margin: 8px 0 0; font-size: 16px; color: #666;}

/* 3. GRUPPEN UND EINTRÄGE */
.rlx-index {text-align: left;}
/* Seit 1.3.2: Steht der Shortcode in einem Absatz-Block, bleibt vor dem Index ein leerer <p> mit 30 px Abstand – ausblenden */
p:empty:has(+ .rlx-index) {display: none;}
.rlx-index__leer {text-align: center;}
.rlx-gruppe {margin: 0 0 40px; scroll-margin-top: 140px;}
.rlx-gruppe[hidden] {display: none;}
.rlx-gruppe__titel {margin: 0 0 20px; padding-bottom: 6px; border-bottom: 1px solid rgba(51,51,51,0.25); font-size: 40px; color: #d41217; text-align: left;}
.rlx-liste {display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 30px; margin: 0 0 20px; padding: 0; list-style: none;}
.rlx-eintrag {margin: 0; padding: 16px 18px; list-style: none; background: rgba(255,255,255,0.55); border: 1px solid rgba(51,51,51,0.15); border-top: 3px solid #d41217;}
.rlx-eintrag[hidden] {display: none;}
.rlx-eintrag__titel {font-size: 22px; font-weight: 700; line-height: 1.3; color: #d41217; text-decoration: none;}
.rlx-eintrag__titel:hover,
.rlx-eintrag__titel:focus {color: #000; text-decoration: underline;}
.rlx-eintrag__text {margin: 6px 0 0; font-size: 18px; line-height: 1.4;}
.rlx-nach-oben {margin: 0; font-size: 16px; text-align: right;}
#rlx-index {scroll-margin-top: 140px;}

/* 4. ANIMATION (Ein-/Ausblenden setzt rlx-search.js über die Klasse rlx-weg) */
.rlx-index--js .rlx-gruppe,
.rlx-index--js .rlx-eintrag {transition: opacity 0.25s ease, transform 0.25s ease;}
.rlx-index--js .rlx-weg {opacity: 0; transform: scale(0.96);}

@media (prefers-reduced-motion: reduce) {
    .rlx-index--js .rlx-gruppe,
    .rlx-index--js .rlx-eintrag {transition: none;}
    .rlx-index--js .rlx-weg {transform: none;}
}

/* 5. MOBIL */
@media (max-width: 991px) {
    .rlx-liste {grid-template-columns: repeat(2, minmax(0, 1fr));}
}

@media (max-width: 990px) {
    .rlx-gruppe,
    #rlx-index {scroll-margin-top: 20px;}
}

@media (max-width: 768px) {
    .rlx-gruppe,
    #rlx-index {scroll-margin-top: 110px;}
}

@media (max-width: 767px) {
    .rlx-liste {grid-template-columns: minmax(0, 1fr); gap: 16px;}
}

@media (max-width: 574px) {
    .rlx-az__liste {gap: 2px 10px;}
    .rlx-az__link {font-size: 18px;}
    .rlx-gruppe__titel {font-size: 26px;}
    .rlx-eintrag {padding: 12px 14px;}
    .rlx-eintrag__titel {font-size: 20px;}
    .rlx-eintrag__text {font-size: 17px;}
}

/* 6. AUTOMATISCHE LINKS UND TOOLTIP (seit 1.3.0)
 *    Link in Textfarbe mit gepunkteter roter Unterstreichung, beim Darüberfahren/Fokus rot (Entscheidung
 *    Michael 10.11.2026). ".content" erhöht die Spezifität über die Theme-Regeln "a", "a:hover, a:focus"
 *    und "main.content a:hover" (css/custom.css). */
.content a.rlx-link {color: inherit; text-decoration: underline dotted #d41217; text-decoration-thickness: 2px; text-underline-offset: 0.18em;}
.content a.rlx-link:hover,
.content a.rlx-link:focus {color: #d41217; text-decoration: underline dotted #d41217;}
.content a.rlx-link:focus-visible {outline: 2px solid #d41217; outline-offset: 2px;}

/* Seit 1.3.5 position: fixed (Fensterkoordinaten) – mit absolute stand der Tooltip auf iPhones unter der Fußzeile,
 * weil im Theme auf Handys der body scrollt (custom.css: html position: relative, body height: 100%) */
.rlx-tooltip {position: fixed; top: 0; left: 0; z-index: 10000; max-width: 340px; padding: 12px 16px; background: #fff; color: #333; border-top: 3px solid #d41217; box-shadow: 0 4px 18px rgba(0,0,0,0.18); font-family: 'Hind Guntur', sans-serif; font-size: 17px; line-height: 1.4; text-align: left; opacity: 0; transition: opacity 0.15s ease;}
.rlx-tooltip[hidden] {display: none;}
.rlx-tooltip--sichtbar {opacity: 1;}
.rlx-tooltip__titel {display: block; margin-bottom: 4px; font-size: 18px; font-weight: 700; color: #d41217;}
.rlx-tooltip__text {display: block;}
/* Link „Mehr erfahren →“ (seit 1.3.3, ersetzt den Touch-Hinweis) */
a.rlx-tooltip__mehr {display: inline-block; margin-top: 8px; font-weight: 700; color: #d41217; text-decoration: none;}
a.rlx-tooltip__mehr:hover,
a.rlx-tooltip__mehr:focus {color: #000; text-decoration: underline;}
.rlx-tooltip__text[hidden] {display: none;}

@media (prefers-reduced-motion: reduce) {
    .rlx-tooltip {transition: none;}
}

@media (max-width: 574px) {
    .rlx-tooltip {max-width: calc(100vw - 20px); font-size: 16px;}
}
