/* =============================================================================
   Cyrcle Region Map – Frontend Styles (v2 · „Chancen statt Ampel")
   ============================================================================= */

.crm-container {
    --crm-purple:        #560293;   /* Jetzt bewerben / Akzent */
    --crm-purple-light:  #8B3FC9;
    --crm-stark:         #FF7B17;   /* Hoher Bedarf */
    --crm-gesucht:       #FFA24F;   /* Geringer Bedarf */
    --crm-offen:         #FFC894;   /* Vereinzelte offene Stellen */
    --crm-jetzt:         #560293;   /* Jetzt bewerben (saisonal) */
    --crm-keine:         #DFE5EC;   /* Keine Daten verfügbar */
    --crm-select:        #560293;   /* Auswahlmarkierung selektierte Region */
    --crm-lime-text:     #333333;   /* Pflicht-Dunkeltext auf Lime */
    --crm-white:         #FFFFFF;
    /* Kampagnenschrift; das Theme lädt sie, hier wird sie nur referenziert. */
    --crm-font: 'SpaceGrotesk', 'Space Grotesk', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --crm-border:        #E5E7EB;
    --crm-bg:            #F8F8F8;
    --crm-text:          #1F2937;
    --crm-text-muted:    #6B7280;
    --crm-gray-c:        #F8F8F8;   /* Block C grauer Hintergrund */
    font-family: var(--crm-font) !important;
    color: var(--crm-text);
    background: var(--crm-white);
    padding: 24px;
    box-sizing: border-box;
    /* Höhensteuerung: Widget als Flex-Column. Filter/Legende sind fix,
       die Karte füllt den Rest. `height`/`max-height` kommen ggf. als
       Inline-Style aus dem Shortcode (validiert, siehe CRM_Widget). */
    display: flex;
    flex-direction: column;
    /*max-height: 100vh;
    max-height: 100dvh;*/
}

/* Eingeloggt: WP-Admin-Bar von der Viewport-Höhe abziehen. */
body.admin-bar .crm-container {
    /*max-height: calc(100vh - 32px);
    max-height: calc(100dvh - var(--wp-admin--admin-bar--height, 32px));*/
}

.crm-map-title,
.crm-map-intro,
.crm-portal-banner,
.crm-filters,
.crm-legend,
.crm-error,
.crm-loading {
    flex: 0 0 auto;
}

.crm-container *,
.crm-container *::before,
.crm-container *::after {
    box-sizing: inherit;
}

/* Kampagnenschrift in der gesamten Karte erzwingen – auch auf den von Leaflet
   erzeugten Elementen und gegen Theme-Regeln mit hoher Spezifität. */
.crm-container,
.crm-container * {
    font-family: var(--crm-font) !important;
}
.leaflet-bottom.leaflet-right {
    display: none;
}
.crm-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

.crm-map-title {
    font-size: 28px;
    font-weight: 600 !important;
    color: #000000;
    margin: 0 0 10px;
    line-height: 1.2;
}

.crm-map-intro {
    font-size: 16px;
    line-height: 1.5;
    color: var(--crm-text);
    margin: 0 0 20px;
    max-width: 70ch;
}

/* =============================================================================
   PORTAL-BANNER (saisonal, oberhalb der Karte)
   Getrennt von der Bedarfsdarstellung – siehe map-template.php.
   ============================================================================= */
.crm-portal-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 20px;
    padding: 16px 20px;
    margin-bottom: 16px;
    border: 2px solid var(--crm-purple);
    background: #F6EFFC;
}

.crm-portal-banner-text {
    margin: 0;
    font-size: 15px;
    font-weight: 600 !important;
    color: var(--crm-text);
    flex: 1 1 320px;
}

.crm-container .crm-portal-banner-btn,
.crm-container .crm-portal-banner-btn:link,
.crm-container .crm-portal-banner-btn:visited {
    flex: 0 0 auto;
    padding: 10px 20px;
    border-width: 0;
    border-radius: 30px;
    background: var(--crm-purple);
    color: #fff !important;
    font-size: 20px;
    font-weight: 600 !important;
    text-decoration: none;
    white-space: nowrap;
}

.crm-container .crm-portal-banner-btn:hover,
.crm-container .crm-portal-banner-btn:focus,
.crm-container .crm-portal-banner-btn:active {
    background: #3F026B;
    color: #fff !important;
    text-decoration: none;
}

.crm-container .crm-portal-banner-btn:focus-visible {
    outline: 3px solid var(--crm-purple-light);
    outline-offset: 2px;
}

/* =============================================================================
   FILTERS
   ============================================================================= */
.crm-filters {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px;
    background: var(--crm-bg);
    border-width: 0;
    margin-bottom: 14px;
}

.crm-filter-heading {
    display: block;
    font-size: 13px;
    font-weight: 700 !important;
    color: var(--crm-text-muted);
    margin-bottom: 8px;
    letter-spacing: 0.03em;
}

/* Primär: Schulart-Tabs */
.crm-school-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.crm-school-tab {
    padding: 10px 20px;
    border-width: 0;
    border-radius: 30px;
    outline: 2px solid var(--crm-border);
    outline-offset: -2px;
    background: #fff;
    color: var(--crm-text);
    font-size: 15px;
    font-weight: 300 !important;
    cursor: pointer;
    transition: all 0.15s ease;
}

/* Hover nur für INAKTIVE Tabs – die generische Regel darf den Active-State
   nicht überschreiben (violette Schrift auf violettem Grund). */
.crm-school-tab:not(.crm-school-tab-active):hover {
    outline: 2px solid var(--crm-purple-light);
    outline-offset: -2px;
    color: var(--crm-purple);
}

.crm-school-tab-active {
    background: var(--crm-purple);
    outline: 2px solid var(--crm-purple);
    outline-offset: -2px;
    color: #fff;
}

/* Aktiv + Hover: Feedback über abgedunkelten Hintergrund, Schrift bleibt weiß
   (Kontrast 14,7:1 · WCAG AA). Gleiches Dunkelviolett wie .crm-btn-apply:hover. */
.crm-school-tab.crm-school-tab-active:hover {
    background: #3F026B;
    outline: 2px solid #3F026B;
    outline-offset: -2px;
    color: #fff;
}

.crm-school-tab:focus-visible {
    outline: 3px solid var(--crm-purple-light);
    outline-offset: 2px;
}

/* Sekundär: Fach-Dropdown */
.crm-filter-secondary {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
}

.crm-filter-secondary .crm-filter-heading {
    width: 100%;
    margin-bottom: 0;
}

.crm-select {
    padding: 9px 12px;
    border: 1px solid var(--crm-border);
    border-radius: 8px;
    font-size: 14px;
    color: var(--crm-text);
    background: #fff;
    cursor: pointer;
    min-width: 200px;
}

.crm-select:focus {
    outline: 2px solid var(--crm-purple-light);
    outline-offset: 1px;
    border-color: var(--crm-purple-light);
}

/* =============================================================================
   BUTTONS
   ============================================================================= */
/* „Zurücksetzen": gleiche Anmutung wie die Schulart-Buttons. Die graue
   Schrift und der dünnere Rahmen ließen ihn vorher deaktiviert wirken. */
.crm-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 300 !important;
    cursor: pointer;
    background: #fff;
    color: var(--crm-text);
    border: 1px solid var(--crm-border);
    transition: all 0.15s ease;
    white-space: nowrap;
}

.crm-container .crm-btn-secondary { border-width: 0; outline: 2px solid var(--crm-border); outline-offset: -2px; }

/* Hover wie bei den inaktiven Schulart-Buttons: violette Kontur und Schrift.
   Steht hinter und über der Regel darüber – die ist gleich spezifisch und
   hat die violette Kontur vorher wieder auf Grau zurückgesetzt. */
.crm-container .crm-btn-secondary:hover {
    background: #fff;
    color: var(--crm-purple);
    outline: 2px solid var(--crm-purple-light);
    outline-offset: -2px;
}

.crm-btn-secondary:focus-visible,
.crm-btn-apply:focus-visible {
    outline: 3px solid var(--crm-purple-light);
    outline-offset: 2px;
}

/* Saisonaler Bewerbungsbutton (Violett) – weißer Text gegen Theme-Linkfarben erzwingen */
.crm-container .crm-btn-apply,
.crm-container .crm-btn-apply:link,
.crm-container .crm-btn-apply:visited {
    display: block;
    width: 100%;
    margin-top: 16px;
    padding: 10px 20px;
    background: var(--crm-purple);
    color: #fff !important;
    border-width: 0;
    border-radius: 30px;
    font-size: 20px;
    font-weight: 600 !important;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.crm-container .crm-btn-apply:hover,
.crm-container .crm-btn-apply:focus,
.crm-container .crm-btn-apply:active {
    background: #3F026B;
    color: #fff !important;
    text-decoration: none;
}

/* =============================================================================
   LEGEND
   ============================================================================= */
.crm-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    align-items: center;
    padding: 10px 14px;
    background: #fff;
    border-width: 0;
    margin-bottom: 10px;
    font-size: 13px;
}

.crm-legend-title {
    font-weight: 700 !important;
    color: var(--crm-text-muted);
}

.crm-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.crm-legend-dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
    /* Kontur, damit der Punkt auch bei sehr hellen Stufenfarben als
       grafisches Objekt erkennbar bleibt (WCAG 1.4.11). */
    border: 1px solid #64748B;
}

/* Die konkreten Farbwerte kommen als CSS-Variablen vom Widget-Container
   (Einstellungen → Stufenfarben); die :root-Werte oben sind nur Fallback. */
.crm-dot-stark_gefragt  { background: var(--crm-stark); }
.crm-dot-gesucht        { background: var(--crm-gesucht); }
.crm-dot-offene_stellen { background: var(--crm-offen); }
.crm-dot-keine_daten    { background: var(--crm-keine); }
.crm-dot-jetzt_bewerben { background: var(--crm-jetzt, var(--crm-purple)); }

/* =============================================================================
   MAP WRAPPER + LEAFLET
   ============================================================================= */
.crm-map-wrapper {
    position: relative;
    display: flex;
    overflow: hidden;
    background: #F8F8F8;
    /* Flex-Item: Basis-Höhe = --crm-map-h (Option „Kartenhöhe"), wächst in
       eine feste Wrapper-Höhe hinein bzw. schrumpft unter max-height –
       min-height als Schutz gegen zu kleine Karten. */
    flex: 1 1 auto;
    height: var(--crm-map-h, 600px);
    min-height: 300px;
}

#crm-map {
    flex: 1 1 auto;
    min-height: 0;
    background: #F8F8F8 !important;
    z-index: 1;
}

.leaflet-container {
    font-family: inherit;
    background: #F8F8F8;
}

/* Sichtbarer Tastaturfokus auf den Regionsflächen. Den Konturwechsel
   übernimmt zusätzlich map.js (gleicher ruhiger Zustand wie beim Hover). */
.crm-map-wrapper .leaflet-interactive:focus,
.crm-map-wrapper .leaflet-interactive:focus-visible {
    outline: 3px solid var(--crm-select, #560293);
    outline-offset: 2px;
}

.leaflet-touch .leaflet-control-zoom a {
    font-size: 16px;
}

.leaflet-tile-pane {
    opacity: 0;
}

.crm-tooltip {
    background: rgba(31, 41, 55, 0.92);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 13px;
    font-weight: 600 !important;
}

.crm-tooltip::before {
    border-top-color: rgba(31, 41, 55, 0.92) !important;
}

/* Beschriftungen der Regionen. Lange Namen („Sächsische Schweiz-
   Osterzgebirge") dürfen umbrechen statt über die Nachbarregion zu laufen. */
.crm-region-label {
    background: transparent;
    border: none;
    box-shadow: none;
    font-size: 11px;
    font-weight: 700 !important;
    line-height: 1.25;
    color: #374151;
    text-align: center;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.crm-region-label span {
    display: inline-block;
    max-width: 100%;
}

/* Beschriftung, die auf schmalen Bildschirmen nicht in ihre Fläche passt.
   Über die Sichtbarkeit, nicht über display: so behält sie ihre Maße und
   der nächste Durchlauf kann messen, ob sie nach dem Zoomen wieder passt. */
.crm-region-label-aus {
    visibility: hidden;
}

/* =============================================================================
   SIDEBAR
   ============================================================================= */
.crm-sidebar {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 340px;
    max-height: calc(100% - 28px);
    background: var(--crm-white);
    z-index: 500;
    overflow-y: auto;
    transform: translateX(0);
    transition: transform 0.25s ease, opacity 0.2s ease;
}

.crm-sidebar-hidden {
    transform: translateX(110%);
    pointer-events: none;
    opacity: 0;
}

.crm-sidebar-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: rgba(255,255,255,0.85);
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--crm-text);
    padding: 4px 8px;
    border-radius: 50%;
    line-height: 1;
    z-index: 2;
}

.crm-sidebar-close:hover {
    background: #fff;
}

/* ---- Blocks ---- */
.crm-block {
    padding: 20px 22px;
}

.crm-block-title {
    font-size: 16px!important;
    font-weight: 700 !important;
    letter-spacing: 0.03em;
    color: var(--crm-text-muted);
    margin: 0 0 14px;
}

/* Block A · Bedarf & Aktion (Hintergrund = Stufenfarbe) */
.crm-block-a {
}

.crm-block-a-level {
    font-size: 13px;
    font-weight: 700 !important;
    letter-spacing: 0.05em;
    opacity: 0.9;
}

.crm-block-a-region {
    font-size: 24px;
    font-weight: 800 !important;
    margin: 4px 0 14px;
    line-height: 1.2;
    padding-right: 26px;
	display:flex;
	flex-direction:column;
}

.crm-block-a-lasub {
    font-size: 15px;
    font-weight: 600 !important;
    opacity: 0.85;
}

.crm-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.crm-chip {
    background: rgba(255,255,255,0.25);
    border-width: 0;
    outline: 1px solid rgba(255,255,255,0.4);
    outline-offset: -1px;
    border-radius: 30px;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600 !important;
}

.crm-featured {
    font-size: 14px;
    margin: 0 0 12px;
    line-height: 1.4;
}

.crm-zuschlag-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.crm-zuschlag-badge {
    display: inline-block;
    background: rgba(255,255,255,0.9);
    color: var(--crm-purple);
    border-width: 0;
    border-radius: 30px;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600 !important;
}

.crm-portal-closed {
    margin: 16px 0 0;
    font-size: 13px;
    font-style: italic;
    opacity: 0.85;
}

/* Block B · Standort */
.crm-block-b {
    border-top: 1px solid var(--crm-border);
}

.crm-loc-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.crm-loc-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
}

.crm-loc-icon {
    font-size: 20px;
    width: 26px;
    text-align: center;
    line-height: 1.2;
}

.crm-loc-label {
    color: var(--crm-text-muted);
    font-size: 12px;
}

.crm-loc-value {
    font-weight: 700 !important;
    font-size: 15px;
    color: var(--crm-text);
    line-height: 1.3;
}

.crm-subpage-link {
    display: inline-block;
    margin-top: 14px;
    font-size: 14px;
    font-weight: 600 !important;
    color: var(--crm-purple);
    text-decoration: none;
}

.crm-subpage-link:hover {
    text-decoration: underline;
}

/* Unterseiten-Link als deutlich sichtbarer Button */
.crm-container .crm-subpage-btn {
    display: block;
    margin-top: 14px;
    padding: 10px 20px;
    border-width: 0;
    outline: 2px solid var(--crm-purple);
    outline-offset: -2px;
    border-radius: 30px;
    text-align: center;
    color: var(--crm-purple) !important;
    background: #fff;
    font-weight: 700 !important;
    text-decoration: none;
}

.crm-container .crm-subpage-btn:hover,
.crm-container .crm-subpage-btn:focus {
    background: var(--crm-purple);
    color: #fff !important;
    text-decoration: none;
}

/* Weiterführende Links am Ende der Sidebar (Beratung + Unterseite) */
.crm-block-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.crm-block-links .crm-subpage-btn,
.crm-block-links .crm-beratung-link {
    margin-top: 0;
}

/* Block C · Dienstbedingungen – nur noch auf der Region-Unterseite */
.crm-block-c {
    background: var(--crm-gray-c);
}

.crm-c-list {
    margin: 0 0 12px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 6px 14px;
    font-size: 14px;
}

.crm-c-list dt {
    color: var(--crm-text-muted);
    font-weight: 600 !important;
}

.crm-c-list dd {
    margin: 0;
    font-weight: 700 !important;
    color: var(--crm-text);
}

.crm-stand {
    font-weight: 500 !important;
    font-size: 12px;
    color: var(--crm-text-muted);
}

/* Der Linktext läuft in der schmalen Sidebar oft über zwei Zeilen – knappe
   Zeilenhöhe, damit die beiden Zeilen als ein Block gelesen werden. */
.crm-beratung-link {
    display: inline-block;
    font-size: 14px;
    font-weight: 600 !important;
    line-height: 1.25;
    color: var(--crm-purple);
    text-decoration: none;
}

.crm-beratung-link:hover {
    text-decoration: underline;
}

/* Testimonial */
.crm-block-testimonial {
    border-top: 1px solid var(--crm-border);
}

.crm-testimonial-person {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

/* Rund und rund bleibend: ohne `flex: 0 0 auto` schrumpft das Bild als
   Flex-Element neben einem langen Namen in die Breite und wird zur Ellipse.
   Die Rundung zusätzlich mit !important, weil Themes gern eine eigene
   Bildregel mitbringen. */
.crm-container .crm-testimonial-avatar {
    flex: 0 0 auto;
    width: 52px;
    min-width: 52px;
    height: 52px;
    border-radius: 50% !important;
    object-fit: cover;
    border: 3px solid var(--crm-purple-light);
}

.crm-testimonial-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F3E8FF;
    color: var(--crm-purple);
    font-weight: 700 !important;
    font-size: 20px;
}

/* Name und Rolle gehören zusammen – knappe Zeilenhöhe statt des vom
   Container geerbten Fließtext-Abstands. */
.crm-testimonial-name {
    font-weight: 700 !important;
    font-size: 15px;
    line-height: 1.25;
    color: var(--crm-text);
}

.crm-testimonial-role {
    font-size: 13px;
    line-height: 1.25;
    color: var(--crm-text-muted);
}

.crm-quote-bubble {
    background: var(--crm-purple);
    color: #fff;
    border-radius: 12px 12px 12px 0;
    padding: 12px 16px;
    font-size: 14px;
    font-style: italic;
    line-height: 1.45;
}

/* =============================================================================
   LOADING + ERROR
   ============================================================================= */
.crm-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    padding: 14px 0;
    color: var(--crm-text-muted);
    font-size: 14px;
}

.crm-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid var(--crm-border);
    border-top-color: var(--crm-purple);
    border-radius: 50%;
    animation: crm-spin 0.7s linear infinite;
}

@keyframes crm-spin {
    to { transform: rotate(360deg); }
}

.crm-error {
    padding: 10px 14px;
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: 8px;
    color: #B91C1C;
    font-size: 13px;
    margin-bottom: 10px;
}

/* =============================================================================
   MOBILE
   ============================================================================= */
@media (max-width: 767px) {
    .crm-container {
        padding: 16px;
    }

    .crm-map-title {
        font-size: 24px;
        margin-bottom: 16px;
    }

    .crm-select {
        width: 100%;
        min-width: 0;
    }

    /* Filterblock enger: auf dem Telefon stand über der Karte mehr Bedienung
       als Karte. */
    .crm-filters {
        gap: 12px;
        padding: 12px;
        margin-bottom: 10px;
    }

    .crm-filter-heading {
        font-size: 12px;
        margin-bottom: 6px;
    }

    /* Schulart- und Zurücksetzen-Knopf kompakter. Beide zusammen, damit sie
       gleich aussehen – das ist seit 3.3.0 so gewollt. Die Polsterung geht
       nicht weiter herunter: so bleiben die Knöpfe 31 px hoch und damit über
       den 24 px, die WCAG 2.2 (2.5.8) als Mindestgröße für Tippflächen
       nennt. */
    .crm-school-tab,
    .crm-container .crm-btn-secondary {
        padding: 8px 14px;
        font-size: 13px;
    }

    .crm-school-tabs {
        gap: 6px;
    }

    /* Legende als zweispaltiges Raster. „Bedarfsstufe:" bekommt eine eigene
       Zeile, die Stufen stehen darunter. Zwei der vier Bezeichnungen sind
       breiter als eine halbe Zeile und brechen um – deshalb oben ausgerichtet,
       damit Punkt und erste Textzeile auf einer Linie liegen. */
    .crm-legend {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
        align-items: start;
        gap: 5px 10px;
        padding: 8px 12px;
        font-size: 12px;
        line-height: 1.3;
    }

    .crm-legend-title {
        grid-column: 1 / -1;
    }

    .crm-legend-item {
        align-items: start;
        gap: 5px;
    }

    .crm-legend-dot {
        width: 11px;
        height: 11px;
        /* Mittig zur ersten Textzeile, nicht zum ganzen Block. */
        margin-top: 2px;
    }

    /* Mobile-Default: Karte 50dvh (Fallback 50vh), min. 300px.
       Vorher 70dvh – das war zu viel leere graue Fläche. Sachsen ist
       1,32-mal so breit wie hoch, auf einem 375-px-Telefon also 323 × 245 px.
       Die Karte ist damit breitenbegrenzt und wird durch eine geringere Höhe
       nicht kleiner, solange der Container mindestens rund 280 px hoch
       bleibt; 50dvh liefert selbst auf einem 667-px-Bildschirm noch 334 px.
       Ein height-/max_height-Attribut am Shortcode greift weiterhin auf
       den Wrapper und begrenzt das Widget als Ganzes. */
    .crm-map-wrapper {
        height: 50vh;
        height: 50dvh;
        min-height: 300px;
    }

    .crm-sidebar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        width: 100%;
        max-height: none;
        height: 78vh;
        transform: translateY(0);
        z-index: 9000;
        overflow-y: auto;
    }

    .crm-sidebar-hidden {
        transform: translateY(100%);
    }
}

@media print {
    .crm-filters,
    .crm-sidebar,
    .crm-loading { display: none !important; }
}

/* Eigenes Icon aus der Mediathek statt Emoji (Einstellungen → Icons) */
.crm-loc-icon-img {
    display: block;
    width: 22px;
    height: 22px;
    object-fit: contain;
    margin: 0 auto;
}

/* =============================================================================
   Info-Schaltfläche („i") mit Hinweisfeld – Zuschlag-Ausnahmen
   Gleiche Umsetzung wie auf den Regionsseiten (region-single.css).
   ============================================================================= */
.crm-container .crm-info {
    position: relative;
    display: inline-flex;
    line-height: 0;
}

.crm-container .crm-info-btn {
    width: 26px;
    height: 26px;
    padding: 0;
    border-width: 0;
    border-radius: 30px;
    background: rgba(255,255,255,0.92);
    color: #1F2937;
    font-size: 15px;
    font-weight: 700 !important;
    font-style: italic;
    line-height: 26px;
    text-align: center;
    cursor: pointer;
    flex: 0 0 auto;
}

.crm-container .crm-info-btn:hover { background: #fff; }

.crm-container .crm-info-btn:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 2px;
}

.crm-container .crm-info-bubble {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    z-index: 40;
    width: max-content;
    max-width: min(260px, 70vw);
    padding: 12px 14px;
    border-radius: 12px;
    background: #1F2937;
    color: #fff;
    font-size: 13px;
    font-weight: 400 !important;
    font-style: normal;
    line-height: 1.45;
    text-align: left;
    white-space: normal;
}

.crm-container .crm-info-bubble::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 9px;
    width: 10px;
    height: 10px;
    background: inherit;
    transform: rotate(45deg);
}

.crm-container .crm-info:hover .crm-info-bubble,
.crm-container .crm-info:focus-within .crm-info-bubble,
.crm-container .crm-info.crm-info-open .crm-info-bubble {
    display: block;
}

/* Das Regionsprofil ist schmal: Hinweisfeld immer nach innen aufklappen,
   sonst wird es am rechten Rand abgeschnitten. */
.crm-sidebar .crm-info-bubble {
    left: auto;
    right: 0;
    max-width: min(240px, 60vw);
}

.crm-sidebar .crm-info-bubble::before {
    left: auto;
    right: 9px;
}

/* =============================================================================
   KEINE SCHLAGSCHATTEN
   Leaflet bringt eigene Schatten für Bedienelemente, Popups und Tooltips mit.
   Sie werden hier innerhalb des Widgets abgeschaltet. Die Zoom-Leiste erhält
   dafür eine dünne Kontur, sonst verschwimmt sie mit hellen Kartenflächen.
   ============================================================================= */
.crm-container .leaflet-bar,
.crm-container .leaflet-control-layers,
.crm-container .leaflet-popup-content-wrapper,
.crm-container .leaflet-popup-tip,
.crm-container .leaflet-tooltip {
    box-shadow: none;
}

.crm-container .leaflet-bar,
.crm-container .leaflet-control-layers {
    outline: 1px solid rgba(0,0,0,0.18);
    outline-offset: -1px;
}

/* Fächer nach Bedarfsstufe: die Zeilen gehören zusammen, sollen sich aber
   voneinander absetzen. */
.crm-container .crm-subject-groups {
    margin: 0 0 12px;
}

.crm-container .crm-subject-group {
    margin: 0 0 4px;
}

.crm-container .crm-subject-group:last-child {
    margin-bottom: 0;
}
