.emergency-care-map { position: relative; max-width: 627px; }

/* Titel: immer über der Karte, kein Abstand nach unten */
.emergency-care-map .ec-map-title {
    margin: 0;
    padding: 6px 12px;
    background: #E6E5ED;
    font-size: 20px;
}

/* Wrapper für Karte + Overlays */
.emergency-care-map .map-wrapper { position: relative; }

/* map-container: NUR Bild + Pins, damit %-Positionierung stimmt */
.emergency-care-map .map-container { position: relative; display: block; width: 100%; font-size: 0; }
.emergency-care-map .map-container img { width: 100%; height: auto; display: block; }

.emergency-care-map .ec-pin {
    position: absolute;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 2;
}
.emergency-care-map .ec-pin:hover {
    z-index: 300;
}

/* Punkt: Optik analog #onkologie .map .circleLink */
.emergency-care-map .ec-circle {
    position: relative;
    z-index: 2;
    display: block;
    width: 14px;
    height: 14px;
    transition: width 0.15s ease-out, height 0.15s ease-out, margin 0.15s ease-out;
    margin: 0 auto;
    padding: 0;
    border: 1px solid #fff;
    border-radius: 50%;
    text-decoration: none;
    box-shadow: 0 0 5px #4c739c;
    cursor: pointer;
}
.emergency-care-map .ec-pin:hover .ec-circle {
    width: 22px;
    height: 22px;
    margin-top: -4px;
}
.emergency-care-map a.ec-circle:hover {
    text-decoration: none;
}

.emergency-care-map .ec-pin .ec-supply {
    position: absolute;
    top: 7px;
    left: 50%;
    z-index: 1;
    display: flex;
    align-items: center;
    height: 22px;
    margin-left: -11px;
    padding: 0 12px 0 16px;
    font-size: 12px;
    font-weight: 600;
    color: #111;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 0 11px 11px 0;
    -webkit-mask-image: radial-gradient(circle 11px at 0 50%, transparent 11px, black 11.5px);
    mask-image: radial-gradient(circle 11px at 0 50%, transparent 11px, black 11.5px);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translate(0, -50%);
    transition: transform 0.25s ease-out, opacity 0.2s ease-out;
}
.emergency-care-map .ec-pin:hover .ec-supply {
    opacity: 1;
    transform: translate(13px, -50%);
}

.emergency-care-map .ec-legend {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
}
.emergency-care-map .ec-legend .ec-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid #333;
    vertical-align: middle;
    margin-right: 4px;
}
.emergency-care-map .ec-legend-supply {
    list-style: none;
    padding: 0;
    margin: 8px 0 0;
    font-size: 12px;
}
.emergency-care-map .ec-legend-supply li { margin: 2px 0; }

.emergency-care-map .ec-map-description {
    margin-top: 10px;
}

.emergency-care-map .ec-desktop-view { display: block; }
.emergency-care-map .ec-mobile-view { display: none; }
.emergency-care-map .ec-mobile-list { margin-top: 12px; }
.emergency-care-map .ec-mobile-item {
    position: relative;
    display: block;
    padding: 12px 42px 12px 14px;
    color: inherit;
    text-decoration: none;
}
.emergency-care-map a.ec-mobile-item:hover,
.emergency-care-map a.ec-mobile-item:focus {
    text-decoration: none;
    background: #f7f7f7;
}
.emergency-care-map .ec-mobile-item-header {
    display: flex;
    align-items: center;
    gap: 10px;
}
.emergency-care-map .ec-mobile-dot {
    display: inline-block;
    flex: 0 0 14px;
    width: 14px;
    height: 14px;
    border: 1px solid #333;
    border-radius: 50%;
    box-shadow: 0 0 5px #4c739c;
}
.emergency-care-map .ec-mobile-dot.ec-level-4 {
    border-color: #999;
}
.emergency-care-map .ec-mobile-name {
    font-weight: 700;
    line-height: 1.3;
}
.emergency-care-map .ec-mobile-meta {
    display: block;
    margin-top: 4px;
    font-size: 13px;
    line-height: 1.4;
    color: #444;
}
.emergency-care-map .ec-mobile-icon {
    position: absolute;
    top: 16px;
    right: 14px;
    font-size: 16px;
    color: #666;
}

/* Mobile-Legenden: standardmäßig versteckt */
.emergency-care-map .ec-legends-mobile { display: none; }

/* Desktop: Overlay-Legenden auf dem Bild, Mobile-Block versteckt */
@media (min-width: 768px) {
    .emergency-care-map .map-wrapper .ec-legend-overlay {
        position: absolute;
        top: 12px;
        left: 16px;
        margin: 0;
        padding: 8px 12px;
        background: rgba(255, 255, 255, 0.9);
        border-radius: 3px;
        flex-direction: column;
        gap: 4px;
        z-index: 3;
    }
    .emergency-care-map .map-wrapper .ec-legend-overlay-bottom {
        position: absolute;
        bottom: 12px;
        left: 16px;
        margin: 0;
        padding: 8px 12px;
        background: rgba(255, 255, 255, 0.9);
        border-radius: 3px;
        z-index: 3;
    }
}

/* Mobile: Overlays verstecken, Mobile-Block nach Footer anzeigen */
@media (max-width: 767px) {
    .emergency-care-map .ec-map-title {
        font-size: 18px;
    }
    .emergency-care-map .ec-desktop-view {
        display: none;
    }
    .emergency-care-map .ec-mobile-view {
        display: block;
    }
    .emergency-care-map .ec-legend-overlay,
    .emergency-care-map .ec-legend-overlay-bottom {
        display: none;
    }
    .emergency-care-map .ec-mobile-view .ec-legends-mobile {
        display: block;
        margin-top: 0;
    }
}

/* Tooltip-Texte erst am max-width umbrechen, nicht nach jedem Wort */
.tooltip {
    z-index: 1080;
}
.tooltip .tooltip-inner {
    width: max-content;
    max-width: 320px;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
}
