/*
 * MeerHeimatLiebe – OSM Map
 * Aktive Karte im SH-Tagesplan / Merkzettel
 */

.mhl-osm-map-panel {
    width: 100%;
    margin: 1rem 0 1.25rem;
}

.mhl-osm-map-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .75rem;
    flex-wrap: wrap;
}

.mhl-osm-map-panel__head h3 {
    margin: 0;
}

.mhl-osm-map-panel__hint {
    font-size: .85rem;
    opacity: .78;
}

.mhl-osm-map {
    position: relative;
    display: block;
    width: 100%;
    height: 390px;
    min-height: 300px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 18px;
    background: #d9e1e4;
    box-shadow: 0 12px 35px rgba(0,0,0,.16);
    isolation: isolate;
}

.mhl-osm-map.leaflet-container {
    width: 100%;
    height: 390px;
    min-height: 300px;
    font: inherit;
    background: #d9e1e4;
}

.mhl-osm-map .leaflet-control {
    z-index: 800;
}

.mhl-osm-map .leaflet-control-zoom a {
    font-weight: 700;
}

.mhl-osm-map .leaflet-popup-content {
    line-height: 1.45;
}

.mhl-osm-map .leaflet-marker-icon,
.mhl-osm-map .leaflet-marker-shadow {
    max-width: none;
}

.mhl-osm-map-panel__actions {
    display: flex;
    justify-content: flex-end;
    gap: .75rem;
    margin-top: .75rem;
    flex-wrap: wrap;
}

@media (max-width: 900px) {
    .mhl-osm-map,
    .mhl-osm-map.leaflet-container {
        height: 340px;
        min-height: 280px;
    }
}

@media (max-width: 600px) {
    .mhl-osm-map-panel__head {
        display: block;
    }

    .mhl-osm-map-panel__hint {
        display: block;
        margin-top: .35rem;
    }

    .mhl-osm-map,
    .mhl-osm-map.leaflet-container {
        height: 280px;
        min-height: 240px;
        border-radius: 14px;
    }

    .mhl-osm-map-panel__actions {
        justify-content: stretch;
    }

    .mhl-osm-map-panel__actions .btn {
        width: 100%;
    }
}

/*
 * Der Merkzettel-Header ist der Bezugspunkt.
 */
[data-trip-plan] .trip-plan__head {
    position: relative !important;
}

/*
 * Die vorhandene Schaf-Grafik sitzt im Header als Pseudo-Element.
 *
 * Wir positionieren sie relativ zur Titelgruppe:
 *   horizontal: direkt rechts vom Titel
 *   vertikal:   Mitte der Titelzeile
 *
 * Wichtig:
 * Die Grafik wird NICHT ausgetauscht und NICHT neu erzeugt.
 * Nur ihre Position wird korrigiert.
 */
[data-trip-plan] .trip-plan__head::after {
    position: absolute !important;
    left: 360px !important;
    top: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translateY(-50%) !important;
    margin: 0 !important;
}

/*
 * Falls die bestehende Installation die Schaf-Grafik über
 * ::before statt ::after erzeugt, gilt dieselbe Position.
 */
[data-trip-plan] .trip-plan__head::before {
    position: absolute !important;
    left: 360px !important;
    top: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translateY(-50%) !important;
    margin: 0 !important;
}

/*
 * Desktop – Titel + Schafe sauber nebeneinander.
 */
@media (min-width: 1101px) {
    [data-trip-plan] .trip-plan__head::after,
    [data-trip-plan] .trip-plan__head::before {
        left: 360px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
    }
}

/*
 * Tablet.
 */
@media (min-width: 641px) and (max-width: 1100px) {
    [data-trip-plan] .trip-plan__head::after,
    [data-trip-plan] .trip-plan__head::before {
        left: 310px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
    }
}

/*
 * Mobil – Grafik kleiner und näher am Titel.
 */
@media (max-width: 640px) {
    [data-trip-plan] .trip-plan__head::after,
    [data-trip-plan] .trip-plan__head::before {
        left: 245px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        max-width: 90px !important;
        background-size: contain !important;
    }
}


/* ============================================================
   MHL_SHEEP_SMALL_TITLE_V3
   Kleine Schafe direkt neben SH-Tagesplan
   Wellen/Anker-Dekoration im Header entfernen
   ============================================================ */

[data-trip-plan] .trip-plan__head {
    position: relative !important;
}

/*
 * Schafgrafik:
 * klein, rechts neben der Titelgruppe,
 * vertikal exakt mittig zum Header.
 */
[data-trip-plan] .trip-plan__head img.mhl-plan-sheep {
    position: absolute !important;
    left: clamp(170px, 20%, 245px) !important;
    top: 50% !important;
    width: 135px !important;
    max-width: 135px !important;
    height: auto !important;
    max-height: 62px !important;
    transform: translateY(-50%) !important;
    object-fit: contain !important;
    z-index: 6 !important;
    pointer-events: none !important;
}

/*
 * Wellen + dekorativer Anker aus dem Planner-Header entfernen.
 * Der funktionale Anker/Button bleibt unangetastet.
 */
[data-trip-plan] .trip-plan__head::before,
[data-trip-plan] .trip-plan__head::after {
    content: none !important;
    display: none !important;
    background: none !important;
}

/* Tablet */
@media (min-width: 641px) and (max-width: 1100px) {
    [data-trip-plan] .trip-plan__head img.mhl-plan-sheep {
        left: 190px !important;
        width: 115px !important;
        max-width: 115px !important;
        max-height: 54px !important;
    }
}

/* Mobil */
@media (max-width: 640px) {
    [data-trip-plan] .trip-plan__head img.mhl-plan-sheep {
        left: 150px !important;
        width: 95px !important;
        max-width: 95px !important;
        max-height: 46px !important;
    }
}



/* ============================================================
   MHL_PLANNER_COSMETIC_V1_OSM
   Keine Wellen-/Ankerfläche im SH-Tagesplan-Header.
   ============================================================ */

[data-trip-plan] .trip-plan__head::before,
[data-trip-plan] .trip-plan__head::after {
    content: none !important;
    display: none !important;
    background: transparent !important;
    box-shadow: none !important;
}
