*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    margin: 0;
    font-family: Arial, sans-serif;
}

#map {
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    border: none;
}

#zoom-level {
    position: absolute;
    top: 10px;
    left: 10px;
    background: white;
    padding: 5px;
    border-radius: 5px;
}

/* Grundfarbe des Location-Buttons (wenn nicht aktiv/clicked) */
#location-button {
    position: absolute;
    display: flex;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background-color: #3498db;
    color: white;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

/* Das Emoji für den user standort, das pulsieren soll */
.user-location-emoji {
    font-size: 20px;
    color: rgb(39, 39, 41);
    display: inline-block;
}

.user-location-emoji.pulsieren {
    animation: pulsieren 1.1s infinite;
}

/* Farbe und Animation für den aktiven Zustand (Tracking läuft) */
#location-button.clicked {
    background-color: #2ecc71;
}

#location-icon.pulsieren {
    animation: pulsieren 1.1s infinite;
}

/* Definition der Pulsieren-Animation */
@keyframes pulsieren {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.6;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

#location-icon {
    font-size: 24px;
    color: white;
}

/* Du hast hier doppelte/widersprüchliche .location-button Regeln.
   Behalte nur die, die du wirklich brauchst, basierend auf deinem JS,
   das #location-button triggert. */
/* .location-button.active {
    background-color: #f44336;
}

.location-button.clicked {
    background-color: #2196F3;
} */

@media (max-width: 768px) {
    /* Wenn #location-button flex ist, ist 'display: block' hier nicht sinnvoll.
       Überlege, was du hier wirklich erreichen willst. */
    /* .location-button {
        display: block;
    } */
}

body {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    height: 100vh;
    margin: 0;
    background-image: url('StolperCleanBackground.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
    padding-top: 20px;
}

.container {
    text-align: center;
    position: relative;
    z-index: 400;
    padding: 0px;
    border-radius: 10px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.0);
}

h1 {
    margin-bottom: 4em;
    margin-top: 10px;
}

input[type="text"],
.checkbox-container {
    padding: 15px;
    font-size: 18px;
    width: 80%;
    margin-bottom: 15px;
    border-radius: 8px;
    border: 1px solid #ccc;
    box-shadow: 0 4px 6px rgba(255, 254, 254, 0.1);
    margin: 0 auto;
    text-align: center;
}

.checkbox-container {
    justify-content: center;
    align-items: center;
    border: 1px solid #ccc;
    background-color: white;
    margin-top: 15px;
}

label {
    color: black;
    font-size: 18px;
    margin-left: 10px;
}

button {
    background-color: #666;
    color: white;
    font-size: 2em;
    width: auto;
    height: 10vh;
    border: none;
    border-radius: 8px;
    box-shadow: 0px 4px 8px rgba(255, 255, 255, 0);
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    z-index: 400;
    margin-top: 0px;
}

button:hover {
    background-color: #555;
    box-shadow: 0px 6px 12px rgba(255, 255, 255, 0);
}

.popup-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.popup-box h2,
.popup-box p {
    color: black;
}

.popup-box {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    max-width: 400px;
    width: 80%;
    text-align: center;
}

/* Popup-Inhalt und Breite */
.leaflet-popup-content {
    font-family: Arial, sans-serif !important;
    font-size: 18px !important;
    padding: 10px;
    max-width: 250px;
    min-width: 150px;
    word-wrap: break-word;
}

/* Stil für den Button im Popup */
.leaflet-popup .approach-button,
.leaflet-popup .cleaned-button {
    font-size: 18px;
    padding: 8px;
    width: auto;
    max-width: 200px;
}

/* Verhindern, dass Popups zu groß werden */
.leaflet-popup-content-wrapper {
    max-width: 350px;
    min-width: 150px;
    word-wrap: break-word;
}

/* Verbesserung der Lesbarkeit des Popup-Titels */
.leaflet-popup-title {
    font-size: 18px;
    font-weight: bold;
}

.alt-poi-icon {
    width: 24px;
    height: 24px;
    border: 2px solid darkred;
    border-radius: 0%;
}

.poi-icon {
    background-color: transparent !important;
    border: none !important;
    padding: 0 !important;
}

.poi-icon .fa-shield-alt {
    font-size: 24px;
    color: green;
    background: none;
    border: none;
}

.poi-icon.green {
    background-color: green;
}

.poi-icon.yellow {
    background-color: yellow;

}
.poi-icon.yellow .marker-fa-icon {
    /* Fügt eine schwarze Umrandung nur um die Dreiecksform des gelben Icons */
    filter: drop-shadow(0px 0px 2px black);
}

.poi-icon.orange {
    background-color: orange;
}

.poi-icon.red {
    background-color: red;
}

.poi-icon.gray {
    background-color: gray;
}

/* CSS für den Cluster */
.marker-cluster-style {
    color: white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.green-cluster {
    background-color: green;
    color: white;
}

.red-cluster {
    background-color: rgb(255, 0, 0);
    color: white;
}

.yellow-cluster {
    background-color: yellow;
    color: black;
}

.orange-cluster {
    background-color: orange;
    color: white;
}

.gray-cluster {
    background-color: gray;
    color: white;
}

/* dimming bei spiderfy */
.dimming-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 999;
    pointer-events: none;
    transition: opacity 0.1s ease-in-out;
    opacity: 0;
}

.dimming-overlay.active {
    opacity: 1;
}

/* Stelle sicher, dass die gespiderfyten Marker ÜBER dem Overlay liegen */
.leaflet-marker-pane .marker-cluster-spiderfy .leaflet-marker-icon {
    z-index: 1000 !important;
    opacity: 1 !important;
}

/* ende dimming bei spiderfy */

/* CSS für das Styling des Stolperstein-Info "aufsuchen"-Buttons */
.approach-button {
    width: auto;
    max-width: 100%;
    height: auto;
    min-height: 3em;
    background-color: pink;
    color: black;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    font-size: 1.2em;
    cursor: pointer;
    text-align: center;
    line-height: 1.2em;
    word-wrap: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
}

.approach-button:hover {
    background-color: lightcoral;
}

/* CSS für den Button "Ist gereinigt" */
.cleaned-button {
    width: auto;
    max-width: 100%;
    height: 3em;
    background-color: green;
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.2em;
    cursor: pointer;
    text-align: center;
    display: block;
    margin-left: auto;
    margin-right: auto;
    padding: 10px 30px;
}

.cleaned-button:hover {
    background-color: #45a049;
}

/* Stellt sicher, dass der Haupt-Container des Markers absolut positioniert ist */
.leaflet-marker-icon.poi-icon {
    position: absolute !important;
}

.leaflet-marker-icon.poi-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    transition: all 0.2s ease-out;
}

.poi-icon .marker-fa-icon {
    font-size: var(--icon-size, 24px);
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    line-height: 1;
    text-align: center;
}

/* Stil für den aktiven (größeren) Marker */
.poi-icon.active-marker {
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.7);
    z-index: 1000;
}

.poi-icon i.fas,
.poi-icon i.far {
    font-size: 20px;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.poi-icon.active-marker i.fas,
.poi-icon.active-marker i.far {
    font-size: 30px;
}

.poi-icon {
    border: 2px solid;
    border-radius: 50%;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* --- NEUE CSS-REGEL FÜR AKTIVE CLUSTER-HIGHLIGHTS START --- */
.cluster-active-highlight {
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.7);
    border: 3px solid #007bff;
}
/* --- NEUE CSS-REGEL FÜR AKTIVE CLUSTER-HIGHLIGHTS ENDE --- */

.user-location-emoji {
    font-size: 20px;
}

.hidden {
    display: none !important;
}

