/**********************************
 *
 *    ROSEN MARKTFINDER – FRONTEND (ab 1.3.0, Suche ab 1.4.0, Karte ab 1.5.0, Reiter ab 1.7.0, Route ab 1.8.0,
 *    große Karte ab 1.14.0)
 *
 *    Container der Shortcodes [rosen_marktfinder] und [rosen_marktfinder_fassbier]
 *    (includes/class-rbmf-shortcodes.php); Aufbau des Inhalts durch assets/js/rbmf-frontend.js,
 *    Kartenbereich durch assets/js/rbmf-map.js (Abschnitt 8; leaflet.css und MarkerCluster.css lädt
 *    rbmf-map.js erst nach Klick – die Regeln hier ergänzen bzw. überschreiben sie innerhalb .rbmf).
 *    Reiter "Alle Märkte" / "Fassbier für Feiern" und Einleitung der Fassbier-Ansicht: Abschnitt 9.
 *    Link "Route mit Apple Karten / Google Maps" (a.rbmf-route): Liste Abschnitt 5, Popup Abschnitt 8.
 *    Große Karte (Button "Karte vergrößern" in der Karte, Ebene über dem Fenster): Abschnitt 10.
 *
 *    Gestaltung nach dem Theme "Rosenbrauerei" (css/custom.css hat Vorrang vor style.css):
 *    - Rot #d41217 (custom.css; style.css enthält noch #e2001a aus der Genesis-Vorlage, nicht wirksam)
 *    - Dunkel #2d2b2a (Header/Footer), Text #333, Linien rgba(51,51,51,.25) wie das Theme-hr
 *    - Schrift Hind Guntur (geerbt), Buttons über die Theme-Klassen .btn .btn-primary
 *    - Umbrüche wie im Theme: 574 / 768 / 992 px, mobil zuerst
 *
 *    Alle Selektoren beginnen mit .rbmf. Ausnahmen in Abschnitt 10: html.rbmf-karte-offen (die Seite hinter
 *    der großen Karte darf nicht scrollen) und .admin-bar .rbmf … (WordPress-Werkzeugleiste).
 *    Zurückgesetzt werden Theme-Regeln, die im Container stören: text-align:center (.main-content),
 *    Listen-Einzug (.sectioncontainer ul/li), Formularfelder (style.css: input padding/width; custom.css:
 *    border-bottom), label 14 px, legend (Bootstrap), h3 34 px zentriert, fehlender Tastaturfokus (* {outline:0}).
 *
 ***********************************/


/**********************************
 *    1. GRUNDLAGEN
 ***********************************/

.rbmf {
    --rbmf-rot: #d41217;
    --rbmf-rot-hell: rgba(212, 18, 23, 0.08);
    --rbmf-dunkel: #2d2b2a;
    --rbmf-text: #333;
    --rbmf-grau: #666;
    --rbmf-linie: rgba(51, 51, 51, 0.25);
    --rbmf-linie-stark: rgba(51, 51, 51, 0.5);
    --rbmf-flaeche: rgba(255, 255, 255, 0.6);

    clear: both;
    width: 100%;
    margin: 0 auto;
    color: var(--rbmf-text);
    font-size: 18px;
    line-height: 1.4;
    text-align: left;
}

.rbmf p {
    margin: 0;
    color: var(--rbmf-text);
    font-size: inherit;
}

.rbmf ul,
.rbmf li {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Attribut hidden (setzt rbmf-frontend.js) gegen display-Regeln aus Plugin und Theme durchsetzen. */
.rbmf [hidden] {
    display: none !important;
}

/* Nur für Screenreader sichtbar (eigene Klasse, unabhängig vom Theme). */
.rbmf .rbmf-sr {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Sichtbarer Tastaturfokus (das Theme entfernt alle Outlines). */
.rbmf :focus-visible {
    outline: 3px solid var(--rbmf-dunkel);
    outline-offset: 3px;
}

.rbmf .btn:focus-visible {
    outline: 3px solid var(--rbmf-dunkel);
    outline-offset: 3px;
    opacity: 1;
}


/**********************************
 *    2. STATUS, HINWEISE, FEHLER
 ***********************************/

.rbmf .rbmf-status {
    padding: 15px 0;
    color: var(--rbmf-grau);
    font-style: italic;
}

.rbmf .rbmf-hinweis {
    margin: 20px 0;
    padding: 15px 20px;
    border-left: 4px solid var(--rbmf-rot);
    background-color: var(--rbmf-flaeche);
}

.rbmf .rbmf-hinweis .btn {
    margin-top: 15px;
}


/**********************************
 *    3. TEXT-BUTTONS UND AUFKLAPPBARE BEREICHE
 ***********************************/

/* Text-Button (z. B. "Auswahl aufheben"): setzt die Button-Regeln aus style.css zurück. */
.rbmf .rbmf-link {
    display: inline;
    width: auto;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: var(--rbmf-rot);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
}

.rbmf .rbmf-link:hover,
.rbmf .rbmf-link:focus {
    background: none;
    color: #000;
}

/* Eigener Pfeil statt des Browser-Markers (einheitlich in allen Browsern). */
.rbmf summary {
    display: block;
    list-style: none;
    cursor: pointer;
}

.rbmf summary::-webkit-details-marker {
    display: none;
}

.rbmf summary::before {
    content: "";
    display: inline-block;
    width: 0;
    height: 0;
    margin-right: 10px;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 8px solid currentColor;
    vertical-align: 1px;
}

.rbmf details[open] > summary::before {
    transform: rotate(90deg);
}


/**********************************
 *    4. SUCHE (ab 1.4.0) UND SORTENFILTER
 ***********************************/

/* Ohne Ortssuche, Standort und Regionen baut rbmf-frontend.js keinen Suchbereich auf. */
.rbmf .rbmf-suche:empty {
    display: none;
}

.rbmf .rbmf-suchform {
    margin: 0 0 20px;
}

.rbmf .rbmf-feld {
    margin: 0 0 15px;
}

/* label im Theme: 14 px → wie die Kategorie-Überschriften im Filter. */
.rbmf .rbmf-feld > label {
    display: block;
    margin: 0 0 6px;
    color: var(--rbmf-dunkel);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Eingabefeld und Button "Suchen" in einer Zeile. */
.rbmf .rbmf-eingabe {
    display: flex;
    gap: 10px;
}

/* Formularfelder: Theme-Regeln (Breite, Innenabstand, nur Rahmen unten) zurücksetzen. */
.rbmf .rbmf-suchform input[type="search"],
.rbmf .rbmf-suchform select {
    box-sizing: border-box;
    width: 100%;
    min-height: 44px;
    margin: 0;
    padding: 8px 12px;
    border: 1px solid var(--rbmf-linie-stark);
    border-radius: 0;
    background-color: var(--rbmf-flaeche);
    color: var(--rbmf-text);
    font-family: inherit;
    font-size: 16px;
    line-height: 1.3;
}

.rbmf .rbmf-suchform input[type="search"] {
    flex: 1 1 auto;
    min-width: 0;
}

.rbmf .rbmf-suchform input[type="search"]:focus,
.rbmf .rbmf-suchform select:focus {
    border: 1px solid var(--rbmf-rot);
}

/* Button "Suchen" neben dem Feld: Theme setzt .btn bis 574 px auf width: 100% und padding 20px 0
   (custom.css) – in der Flex-Zeile würde das Eingabefeld sonst auf 0 schrumpfen. */
.rbmf .rbmf-eingabe .btn {
    flex: 0 0 auto;
    width: auto;
    margin: 0;
    padding-right: 20px;
    padding-left: 20px;
}

.rbmf .rbmf-eingabe .btn[disabled] {
    opacity: 0.6;
    cursor: wait;
}

.rbmf .rbmf-nahe-zeile {
    margin: 0 0 15px;
}

/* "In meiner Nähe": Text-Button mit Standort-Punkt davor (nur CSS, keine Grafik). */
.rbmf .rbmf-nahe::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 8px;
    border: 2px solid currentColor;
    border-radius: 50%;
    vertical-align: 1px;
}

.rbmf .rbmf-link[disabled] {
    opacity: 0.6;
    cursor: wait;
}

/* Umkreis und Region: mobil untereinander, ab 574 px nebeneinander (siehe Abschnitt 7). */
.rbmf .rbmf-auswahlen {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    column-gap: 20px;
}

.rbmf .rbmf-suchhinweis {
    margin: 0 0 10px;
    color: var(--rbmf-text);
    font-size: 16px;
}

.rbmf .rbmf-suchhinweis:empty {
    display: none;
}

.rbmf .rbmf-suchhinweis.rbmf-fehler {
    padding: 10px 15px;
    border-left: 4px solid var(--rbmf-rot);
    background-color: var(--rbmf-flaeche);
}

/* Mehrere Orte gefunden: Auswahl als Schaltflächen (wie die Sorten im Filter). */
.rbmf .rbmf-ortsauswahl {
    margin: 0 0 15px;
}

.rbmf .rbmf-orte {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.rbmf .rbmf-ort {
    width: auto;
    margin: 0;
    padding: 8px 14px;
    border: 1px solid var(--rbmf-linie-stark);
    border-radius: 0;
    background-color: var(--rbmf-flaeche);
    color: var(--rbmf-text);
    font-family: inherit;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.3;
    text-align: left;
    text-transform: none;
    letter-spacing: 0;
    cursor: pointer;
}

.rbmf .rbmf-ort:hover,
.rbmf .rbmf-ort:focus {
    border-color: var(--rbmf-rot);
    background-color: var(--rbmf-rot-hell);
    color: var(--rbmf-text);
}

/* Quellenangabe der Ortssuche: immer sichtbar (Nominatim-Policy). */
.rbmf .rbmf-quelle {
    margin: 0;
    color: var(--rbmf-grau);
    font-size: 13px;
}

.rbmf .rbmf-quelle a {
    color: var(--rbmf-grau);
    text-decoration: underline;
}

.rbmf .rbmf-quelle a:hover,
.rbmf .rbmf-quelle a:focus {
    color: var(--rbmf-rot);
}

.rbmf .rbmf-filter {
    margin: 0 0 20px;
    border-top: 1px solid var(--rbmf-linie);
    border-bottom: 1px solid var(--rbmf-linie);
}

.rbmf .rbmf-filter > summary {
    padding: 15px 0;
    color: var(--rbmf-rot);
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.rbmf .rbmf-filter-inhalt {
    padding: 5px 0 20px;
}

.rbmf .rbmf-kategorie {
    min-width: 0;
    margin: 0 0 20px;
    padding: 0;
    border: 0;
}

.rbmf .rbmf-kategorie > legend {
    display: block;
    width: 100%;
    margin: 0 0 10px;
    padding: 0;
    color: var(--rbmf-dunkel);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.rbmf .rbmf-sorten-auswahl {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Sorte als Schaltfläche; .rbmf-aktiv setzt rbmf-frontend.js bei gewählter Checkbox. */
.rbmf .rbmf-sorte {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 8px 14px;
    border: 1px solid var(--rbmf-linie-stark);
    background-color: var(--rbmf-flaeche);
    color: var(--rbmf-text);
    font-size: 16px;
    line-height: 1.3;
    cursor: pointer;
}

.rbmf .rbmf-sorte:hover {
    border-color: var(--rbmf-rot);
}

.rbmf .rbmf-sorte.rbmf-aktiv {
    border-color: var(--rbmf-rot);
    background-color: var(--rbmf-rot-hell);
    font-weight: 700;
}

.rbmf .rbmf-sorte:focus-within {
    outline: 3px solid var(--rbmf-dunkel);
    outline-offset: 2px;
}

/* Checkbox: Theme-Regeln für input (Breite, Innenabstand, Rahmen unten) zurücksetzen. */
.rbmf .rbmf-sorte input[type="checkbox"] {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin: 0;
    padding: 0;
    border: 0;
    accent-color: var(--rbmf-rot);
    cursor: pointer;
}

.rbmf .rbmf-sorte input[type="checkbox"]:focus {
    border: 0;
    outline: none;
}

.rbmf .rbmf-saisonal {
    color: var(--rbmf-grau);
    font-size: 14px;
    font-weight: 400;
}

.rbmf .rbmf-filter-aktionen {
    margin-top: 5px;
}


/**********************************
 *    5. TREFFER UND MARKTLISTE
 ***********************************/

.rbmf .rbmf-treffer {
    margin: 0 0 10px;
    font-weight: 700;
}

/* "N Märkte ohne Standortangabe / Regionszuordnung sind nicht berücksichtigt." */
.rbmf .rbmf-ohne {
    margin: -5px 0 10px;
    color: var(--rbmf-grau);
    font-size: 15px;
}

/* "Umkreis auf X km erweitern" und "Suche zurücksetzen". */
.rbmf .rbmf-such-aktionen {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 25px;
    margin: 0 0 15px;
}

.rbmf .rbmf-liste {
    border-top: 1px solid var(--rbmf-linie);
}

.rbmf .rbmf-markt {
    padding: 20px 0;
    border-bottom: 1px solid var(--rbmf-linie);
}

/* h3 im Theme: 34 px, zentriert, Hind Guntur 700. */
.rbmf .rbmf-name {
    margin: 0 0 4px;
    color: var(--rbmf-text);
    font-family: inherit;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.25;
    text-align: left;
    text-transform: none;
}

.rbmf .rbmf-typ {
    margin: 0 0 6px;
    color: var(--rbmf-grau);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.rbmf .rbmf-adresse {
    margin: 0 0 10px;
}

/* Entfernung zum Ort bzw. Standort (nur bei aktivem Umkreis). */
.rbmf .rbmf-entfernung {
    margin: -5px 0 10px;
    color: var(--rbmf-rot);
    font-size: 15px;
    font-weight: 700;
}

/* "Auf der Karte zeigen" (ab 1.5.0): nur sichtbar, solange die Karte geladen ist (.rbmf-karte-aktiv setzt rbmf-map.js). */
.rbmf .rbmf-zeigen-zeile {
    display: none;
    margin: 0 0 10px;
}

.rbmf.rbmf-karte-aktiv .rbmf-zeigen-zeile {
    display: block;
}

/* "Route mit Apple Karten / Google Maps" (ab 1.8.0): Link in Liste und Popup, gestaltet wie .rbmf-link;
   Pfeil nach oben rechts = öffnet ein neues Fenster (Ansage über aria-label, siehe rbmf-frontend.js). */
.rbmf .rbmf-route-zeile {
    margin: 0 0 10px;
}

.rbmf .rbmf-route {
    color: var(--rbmf-rot);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.rbmf .rbmf-route::after {
    content: "\2197";
    display: inline-block;
    margin-left: 6px;
    text-transform: none;
}

.rbmf .rbmf-route:hover,
.rbmf .rbmf-route:focus {
    color: #000;
    text-decoration: underline;
}

/* Aufklappbare Sortenliste je Markt: zeigt immer alle Sorten des Marktes, gewählte hervorgehoben. */
.rbmf .rbmf-sorten > summary {
    color: var(--rbmf-rot);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.rbmf .rbmf-sorten-inhalt {
    padding-top: 10px;
}

.rbmf .rbmf-sorten-gruppe + .rbmf-sorten-gruppe {
    margin-top: 10px;
}

.rbmf .rbmf-sorten-kategorie {
    margin: 0 0 5px;
    color: var(--rbmf-dunkel);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.rbmf .rbmf-sorten-liste {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.rbmf .rbmf-sorten-liste > li {
    padding: 3px 10px;
    background-color: rgba(51, 51, 51, 0.06);
    font-size: 15px;
    line-height: 1.4;
}

.rbmf .rbmf-sorten-liste > li.rbmf-gewaehlt {
    background-color: var(--rbmf-rot);
    color: #fff;
    font-weight: 700;
}


/**********************************
 *    6. WEITERE ANZEIGEN, DATENSTAND
 ***********************************/

.rbmf .rbmf-mehr {
    margin: 30px 0 0;
    text-align: center;
}

.rbmf .rbmf-stand {
    margin: 30px 0 0;
    color: var(--rbmf-grau);
    font-size: 14px;
}


/**********************************
 *    7. RESPONSIVE UND BEWEGUNG
 ***********************************/

/* Wie das Theme: Fließtext mobil 16 px. */
@media (max-width: 574px) {
    .rbmf {
        font-size: 16px;
    }

    .rbmf .rbmf-name {
        font-size: 18px;
    }

    .rbmf .rbmf-sorte {
        font-size: 15px;
    }
}

/* Ab 574 px: Umkreis und Region nebeneinander. */
@media (min-width: 574px) {
    .rbmf .rbmf-auswahlen {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Ab Tablet: Märkte zweispaltig (ab 992 px neben der Karte wieder einspaltig, siehe Abschnitt 8). */
@media (min-width: 768px) {
    .rbmf .rbmf-liste {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 30px;
        align-items: start;
    }
}

/* Übergänge des Themes (*:hover, *:after) im Container abschalten. */
@media (prefers-reduced-motion: reduce) {
    .rbmf,
    .rbmf *,
    .rbmf *::before,
    .rbmf *::after {
        transition: none !important;
    }
}


/**********************************
 *    8. KARTE (ab 1.5.0)
 *
 *    Aufbau (rbmf-frontend.js): div.rbmf-ergebnis > div.rbmf-karte-bereich[data-rbmf-karte] + div.rbmf-listenbereich
 *    Inhalt des Kartenbereichs (rbmf-map.js): Platzhalter .rbmf-karte-hinweis (Klick zum Laden, Lade- und
 *    Fehlerzustand) bzw. div.rbmf-karte (Leaflet-Container).
 *    Mobil und Tablet: Karte über der Liste. Ab 992 px: Liste links (einspaltig), Karte rechts mitlaufend.
 *    Responsive Regeln stehen hier statt in Abschnitt 7, damit sie nach den Grundregeln greifen.
 ***********************************/

.rbmf .rbmf-karte-bereich {
    margin: 0 0 20px;
}

.rbmf .rbmf-karte-bereich:empty {
    display: none;
}

/* Platzhalter: Datenschutz-Hinweis und Button "Karte laden"; auch für Lade- und Fehlermeldung. */
.rbmf .rbmf-karte-hinweis {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 15px;
    box-sizing: border-box;
    min-height: 200px;
    padding: 20px;
    border: 1px solid var(--rbmf-linie-stark);
    background-color: var(--rbmf-flaeche);
}

.rbmf .rbmf-karte-hinweis p {
    font-size: 16px;
}

.rbmf .rbmf-karte-hinweis a {
    color: var(--rbmf-rot);
    text-decoration: underline;
}

.rbmf .rbmf-karte-hinweis a:hover,
.rbmf .rbmf-karte-hinweis a:focus {
    color: #000;
}

.rbmf .rbmf-karte-hinweis .btn {
    margin: 0;
}

.rbmf .rbmf-karte-hinweis .btn[disabled] {
    opacity: 0.6;
    cursor: wait;
}

.rbmf .rbmf-karte-hinweis.rbmf-fehler {
    border-left: 4px solid var(--rbmf-rot);
}

/* Leaflet-Container. isolation: eigene Stapelebene, damit Leaflet-Ebenen (z-index bis 1000) nicht über
   Theme-Header oder Menü liegen. */
.rbmf .rbmf-karte {
    position: relative;
    isolation: isolate;
    z-index: 0;
    box-sizing: border-box;
    width: 100%;
    height: 360px;
    border: 1px solid var(--rbmf-linie-stark);
    background-color: #e9e6df;
}

/* Theme-Regeln im Kartencontainer zurücksetzen (Schrift, zentrierter Text, Links, Listen). */
.rbmf .leaflet-container {
    font-family: inherit;
    font-size: 14px;
    line-height: 1.4;
    text-align: left;
}

.rbmf .leaflet-container a {
    color: var(--rbmf-rot);
}

.rbmf .leaflet-container.rbmf-karte:focus-visible {
    outline-offset: -3px;
}

/* Zoom-Buttons: Theme-Linkfarbe und Großschreibung neutralisieren. */
.rbmf .leaflet-bar a,
.rbmf .leaflet-bar a:hover,
.rbmf .leaflet-bar a:focus {
    color: var(--rbmf-dunkel);
    font-family: inherit;
    text-transform: none;
    letter-spacing: 0;
}

/* Quellenangabe: gut lesbar und immer sichtbar (OSM Tile Usage Policy). */
.rbmf .leaflet-control-attribution {
    font-size: 12px;
    line-height: 1.4;
}

.rbmf .leaflet-control-attribution a {
    color: var(--rbmf-dunkel);
    text-decoration: underline;
}

/* Cluster (eigene iconCreateFunction, ohne MarkerCluster.Default.css): Kreis in Theme-Rot. */
.rbmf .rbmf-cluster {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(212, 18, 23, 0.25);
}

.rbmf .rbmf-cluster-zahl {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: var(--rbmf-rot);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
}

/* Bezugspunkt (Ort bzw. Standort) bei aktivem Umkreis. */
.rbmf .rbmf-bezugspunkt {
    box-sizing: border-box;
    border: 3px solid #fff;
    border-radius: 50%;
    background-color: var(--rbmf-dunkel);
    box-shadow: 0 0 0 2px var(--rbmf-dunkel);
}

/* Popup (Inhalt per DOM aus rbmf-map.js). */
.rbmf .leaflet-popup-content {
    margin: 12px 16px;
    font-size: 15px;
    line-height: 1.4;
}

.rbmf .rbmf-popup-name {
    margin: 0 0 4px;
    color: var(--rbmf-text);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.25;
}

.rbmf .rbmf-popup-typ {
    margin: 0 0 6px;
    color: var(--rbmf-grau);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.rbmf .rbmf-popup-adresse {
    margin: 0;
}

.rbmf .rbmf-popup-entfernung {
    margin: 6px 0 0;
    color: var(--rbmf-rot);
    font-size: 14px;
    font-weight: 700;
}

/* Link "Route mit …" im Popup (ab 1.8.0; Grundgestaltung .rbmf-route in Abschnitt 5). */
.rbmf .rbmf-popup-route {
    margin: 10px 0 0;
}

.rbmf .leaflet-container a.rbmf-route {
    color: var(--rbmf-rot);
    font-size: 13px;
}

.rbmf .leaflet-container a.rbmf-route:hover,
.rbmf .leaflet-container a.rbmf-route:focus {
    color: #000;
}

.rbmf .leaflet-container a.leaflet-popup-close-button {
    color: var(--rbmf-grau);
}

/* Tablet: höhere Karte, weiterhin über der (zweispaltigen) Liste. */
@media (min-width: 768px) {
    .rbmf .rbmf-karte {
        height: 440px;
    }
}

/* Desktop: Liste links einspaltig, Karte rechts mitlaufend (sticky). Ohne Kartenbereich volle Breite. */
@media (min-width: 992px) {
    .rbmf .rbmf-ergebnis {
        display: flex;
        align-items: flex-start;
        gap: 30px;
    }

    .rbmf .rbmf-listenbereich {
        flex: 1 1 0;
        order: 1;
        min-width: 0;
    }

    .rbmf .rbmf-karte-bereich {
        position: sticky;
        top: 20px;
        flex: 1 1 0;
        order: 2;
        min-width: 0;
        margin: 0;
    }

    .rbmf .rbmf-karte-bereich ~ .rbmf-listenbereich .rbmf-liste {
        display: block;
    }

    .rbmf .rbmf-karte {
        height: 600px;
        max-height: calc(100vh - 40px);
    }
}


/**********************************
 *    9. REITER (ab 1.7.0)
 *
 *    Aufbau (rbmf-frontend.js, nur [rosen_marktfinder] mit mindestens einem Fassbier-Markt):
 *    div.rbmf-reiter[role=tablist] > 2 × button.rbmf-tab (aktiver Reiter + .rbmf-aktiv), danach
 *    div.rbmf-panel[role=tabpanel][tabindex=0] mit dem gesamten Inhalt.
 *    p.rbmf-einleitung nur in der Fassbier-Ansicht (auch bei [rosen_marktfinder_fassbier] ohne Reiter).
 *    Reiter sind Buttons ohne .btn (Theme-Befund E greift nicht); die Button-Regeln aus style.css
 *    werden wie bei .rbmf-link (Abschnitt 3) zurückgesetzt. Aktiver Reiter: Farbe und Unterstrich,
 *    also nicht nur über die Farbe erkennbar.
 ***********************************/

.rbmf .rbmf-reiter {
    display: flex;
    margin: 0 0 20px;
    border-bottom: 1px solid var(--rbmf-linie);
}

/* Unterstrich 3 px liegt per margin-bottom -1px auf der Linie der Leiste. */
.rbmf .rbmf-tab {
    display: block;
    flex: 0 0 auto;
    width: auto;
    margin: 0 0 -1px;
    padding: 12px 20px;
    border: 0;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    background: none;
    box-shadow: none;
    color: var(--rbmf-dunkel);
    font-family: inherit;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
}

.rbmf .rbmf-tab:hover,
.rbmf .rbmf-tab:focus {
    background: none;
    color: var(--rbmf-rot);
}

.rbmf .rbmf-tab.rbmf-aktiv {
    border-bottom-color: var(--rbmf-rot);
    color: var(--rbmf-rot);
}

/* Fokus innen, damit die Linie der Leiste ihn nicht abschneidet. */
.rbmf .rbmf-tab:focus-visible {
    outline: 3px solid var(--rbmf-dunkel);
    outline-offset: -3px;
}

/* Panel ist fokussierbar (APG); Rahmen mit Abstand zum Inhalt. */
.rbmf .rbmf-panel:focus-visible {
    outline-offset: 6px;
}

/* Einleitung der Fassbier-Ansicht: schlichter Textabsatz (Hinweis-Kasten bleibt Fehlern/Datenschutz vorbehalten). */
.rbmf .rbmf-einleitung {
    margin: 0 0 20px;
}

/* Mobil: Reiter gleich breit, Umbruch erlaubt. */
@media (max-width: 574px) {
    .rbmf .rbmf-tab {
        flex: 1 1 0;
        min-width: 0;
        padding: 12px 8px;
        font-size: 16px;
        letter-spacing: 0.5px;
    }
}


/**********************************
 *    10. GROSSE KARTE (ab 1.14.0)
 *
 *    rbmf-map.js (Abschnitt 4b): Leaflet-Steuerelement oben rechts div.leaflet-bar.rbmf-gross-leiste >
 *    button.rbmf-gross-knopf > svg.rbmf-gross-symbol. Beim Vergrößern erhält der Kartenbereich
 *    .rbmf-karte-gross (Ebene über dem ganzen Fenster) und <html> .rbmf-karte-offen (Seite scrollt nicht).
 *    Keine Fullscreen API (iPhone), Entscheidung Michael 09.11.2026 (Variante A).
 *    z-index 9998: über Header (1000, custom.css) und mobilem Menü (1300), unter Altersabfrage und
 *    Preloader (9999). Angemeldet: Abstand für die WordPress-Werkzeugleiste (32 px, bis 782 px 46 px;
 *    bis 600 px scrollt die Leiste mit der Seite – dann kann oben ein Streifen der Seite sichtbar sein).
 *    Steht nach Abschnitt 8, damit die Regeln die mitlaufende Karte ab 992 px (sticky) überschreiben.
 ***********************************/

/* Keine Animation von Größe und Lage (ab 1.14.1): Theme custom.css Z. 51 *:hover { transition: all 0.3s }
   animiert sonst beim Klick auf den Button (Maus über der Karte) Höhe/Breite → Leaflet misst Zwischengrößen,
   der Ausschnitt stimmt nicht, unten fehlen Kacheln (Befund Test 09.11.2026). Nur diese beiden Elemente –
   die Zoom-Animationen von Leaflet im Inneren hängen an eigenen Klassen und bleiben unberührt. */
.rbmf .rbmf-karte-bereich,
.rbmf .rbmf-karte-bereich:hover,
.rbmf .rbmf-karte,
.rbmf .rbmf-karte:hover {
    transition: none;
}

/* Seite hinter der großen Karte nicht scrollen (body hat im Theme overflow-x: hidden). */
html.rbmf-karte-offen,
html.rbmf-karte-offen body {
    overflow: hidden;
}

/* Button im Stil der Leaflet-Zoom-Buttons (30 × 30 px); Button-Regeln aus style.css (#333, Innenabstand,
   Hover Rot) zurückgesetzt. */
.rbmf .rbmf-gross-knopf {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 30px;
    height: 30px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 2px;
    background-color: #fff;
    box-shadow: none;
    color: var(--rbmf-dunkel);
    font-family: inherit;
    font-size: 14px;
    line-height: 1;
    text-transform: none;
    letter-spacing: 0;
    cursor: pointer;
}

.rbmf .rbmf-gross-knopf:hover,
.rbmf .rbmf-gross-knopf:focus {
    background-color: #f4f4f4;
    color: var(--rbmf-rot);
}

.rbmf .rbmf-gross-knopf:focus-visible {
    outline: 3px solid var(--rbmf-dunkel);
    outline-offset: 1px;
}

.rbmf .rbmf-gross-symbol {
    display: block;
    width: 18px;
    height: 18px;
}

/* Große Karte: Kartenbereich fest über dem Fenster; Ränder für Notch/Home-Indikator (env()). */
.rbmf .rbmf-karte-bereich.rbmf-karte-gross {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 9998;
    box-sizing: border-box;
    width: auto;
    margin: 0;
    padding: env(safe-area-inset-top, 0) env(safe-area-inset-right, 0) env(safe-area-inset-bottom, 0) env(safe-area-inset-left, 0);
    background-color: var(--rbmf-dunkel);
}

.rbmf .rbmf-karte-gross .rbmf-karte {
    width: 100%;
    height: 100%;
    max-height: none;
    border: 0;
}

/* Angemeldet: WordPress-Werkzeugleiste (body.admin-bar) bleibt sichtbar. */
.admin-bar .rbmf .rbmf-karte-bereich.rbmf-karte-gross {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar .rbmf .rbmf-karte-bereich.rbmf-karte-gross {
        top: 46px;
    }
}
