.map-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}
.map-tab {
    padding: 10px 20px;
    background: #f0f0f0;
    border: 1px solid #ccc;
    cursor: pointer;
    border-radius: 4px;
}
.map-tab.active {
    background: #2271b1;
    color: white;
    border-color: #135e96;
}

.bezirk-label {
    background: transparent;
    border: none;
    text-align: center;
}
.bezirk-label span {
    font-weight: bold;
    font-size: 11px;
    color: #444;
    text-shadow: 1px 1px 2px white, -1px -1px 2px white;
    white-space: nowrap;
}

/* Button im Popup */
.map-popup-button {
    display: block;
    background-color: #2271b1;
    color: #fff !important;
    padding: 10px;
    text-align: center;
    text-decoration: none !important;
    border-radius: 4px;
    font-weight: bold;
}
.map-popup-button:hover {
    background-color: #135e96;
}
.leaflet-container :focus {
    outline: none !important;
}

/* Speziell für die Pfade (Polygone) in der Karte */
path.leaflet-interactive:focus {
    outline: none !important;
}
.leaflet-top{
    z-index: 600;
}

.map-layout-wrapper {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    width: 100%; 
}

#map {
    flex: 2; /* Die Karte nimmt 2/3 des Platzes ein */
    border-radius: 8px;
}

.map-sidebar {
    flex: 1; /* Die Liste nimmt 1/3 des Platzes ein */
    max-height: 800px;
    overflow-y: auto; /* Scrollbar, falls die Liste lang ist */
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.sidebar-list {
    list-style: none;
    padding: 0;
}

.sidebar-list li {
    padding: 10px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.2s;
}

.sidebar-list li:hover {
    background: #e1ecf4;
    color: #2271b1;
}

.leaflet-container.leaflet-popup-open .leaflet-tooltip {
    display: none !important;
}

/* Responsive: Auf dem Handy untereinander anzeigen */
@media (max-width: 768px) {
    .map-layout-wrapper {
        flex-direction: column;
    }
    #map {
        width: 100%;    /* Volle Breite erzwingen */
        height: 400px;  /* WICHTIG: Höhe auf Mobile reduzieren, damit man noch scrollen kann */
        flex: none;     /* Flex-Werte aufheben */
    }

    .map-sidebar {
        width: 100%;    /* Volle Breite erzwingen */
        max-height: 400px; /* Liste ebenfalls begrenzen */
        flex: none;
    }

    /* Speziell für ganz kleine Handys */
    .map-tab {
        flex: 1 1 100%; /* Jeder Button nimmt eine volle eigene Zeile ein */
    }
}
