/* CSS Variables for easy theme management */
:root {
    --font-family: 'Montserrat', sans-serif;
    --primary-color: #007bff;
    --primary-hover-color: #0056b3;
    --background-color: #ffffff;
    --text-color-dark: #333;
    --text-color-light: #555;
    --border-color: #ddd;
    --shadow-light: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-medium: 0 4px 8px rgba(0,0,0,0.1);
    --border-radius: 8px;
}

body {
    font-family: var(--font-family);
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}

#map { height: 100vh; }

.controls-container {
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1000;
    max-width: 320px;
    width: 90%;
    max-height: calc(100vh - 30px);
    overflow-y: auto;
    font-size: 0.9em;
}

.panel {
    background-color: var(--background-color);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
}

.header-container { margin-bottom: 10px; }

.responsive-logo {
    display: block;
    width: 100%;
    height: auto;
    max-width: 120px;
    margin: 0 auto 15px auto;
}

.claim {
    text-align: center;
    font-style: italic;
    font-size: 1em;
    color: var(--text-color-light);
    margin: 0 0 25px 0;
}

/* Info Box / Modal */
.info-box-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.info-box-backdrop.is-visible { display: flex; }

.info-box-content {
    background: var(--background-color);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    text-align: justify;
    font-size: 0.9em;
    color: var(--text-color-dark);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.5em;
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
    line-height: 1;
    color: var(--text-color-light);
    transition: color 0.2s ease;
}
.close-btn:hover { color: #000; }

.about-link {
    display: block;
    text-align: center;
    font-size: 0.8em;
    color: var(--primary-color);
    text-decoration: underline;
    cursor: pointer;
    margin: 25px 0;
    border: none;
    background: none;
    width: 100%;
    font-family: inherit;
}
.about-link:hover { color: var(--primary-hover-color); }

.info-box-logo { margin-bottom: 15px; }

/* Search and Filters */
.search-container {
    margin: 25px 0 15px 0;
    position: relative;
}

#search-input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    background-color: #fff;
    color: var(--text-color-dark);
    border-radius: 20px;
    box-shadow: var(--shadow-light);
    font-family: inherit;
    font-size: 1em;
    transition: all 0.2s ease-in-out;
    box-sizing: border-box;
}
#search-input::placeholder { color: #aaa; }
#search-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--primary-color);
    border-color: var(--primary-color);
}

#search-button {
    width: 100%;
    padding: 10px 5px;
    border: 1px solid var(--primary-color);
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 20px;
    cursor: pointer;
    font-size: 1em;
    box-shadow: var(--shadow-light);
    margin-top: 10px;
    transition: background-color 0.2s ease;
}

#search-button:hover {
    background-color: var(--primary-hover-color);
}

#autocomplete-results {
    position: absolute;
    top: calc(100% - 30px);
    left: 0;
    right: 0;
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    max-height: 200px;
    overflow-y: auto;
    box-shadow: var(--shadow-medium);
    z-index: 100;
    display: none;
}

.autocomplete-item {
    padding: 12px 20px;
    cursor: pointer;
    font-size: 0.9em;
    color: var(--text-color-dark);
    border-bottom: 1px solid var(--border-color);
}
.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover { background-color: #f4f4f4; }

fieldset {
    border: none;
    padding: 0;
    margin: 0;
    font-size: 0.9em;
    line-height: 1.8;
}

legend {
    font-size: 1.1em;
    font-weight: bold;
    margin: 10px 0 10px 0;
    color: var(--text-color-dark);
    padding: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
}

/* Icons for the legends */
#status-filters legend::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    background-color: var(--text-color-dark);
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 11.08V12a10 10 0 1 1-5.93-9.14'%3E%3C/path%3E%3Cpolyline points='22 4 12 14.01 9 11.01'%3E%3C/polyline%3E%3C/svg%3E");
    mask-size: contain;
}

#waste-filters legend::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    background-color: var(--text-color-dark);
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z'%3E%3C/path%3E%3Cline x1='7' y1='7' x2='7.01' y2='7'%3E%3C/line%3E%3C/svg%3E");
    mask-size: contain;
}


#waste-filters { margin-top: 20px; }

.color-dot {
    height: 12px;
    width: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
    border: 1px solid #999;
    vertical-align: middle;
}

#copyright {
    position: fixed;
    bottom: 10px;
    left: 10px;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 5px 10px;
    border-radius: var(--border-radius);
    font-size: 0.8em;
    color: var(--text-color-light);
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-link {
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    font-size: inherit;
    color: var(--primary-color);
    text-decoration: underline;
    cursor: pointer;
}
.footer-link:hover { color: var(--primary-hover-color); }

.info-box-content h4 {
    margin-top: 20px;
    margin-bottom: 5px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 5px;
    color: var(--text-color-dark);
}

.info-box-content a {
    color: var(--primary-color);
    text-decoration: none;
}
.info-box-content a:hover { text-decoration: underline; }

/* Mobile Menu Button Styles */
.menu-toggle {
    position: fixed;
    top: 15px;
    /* HIER IST DIE ÄNDERUNG 1/2: Position von rechts nach links geändert */
    left: 15px; 
    z-index: 1001;
    width: 44px;
    height: 44px;
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    cursor: pointer;
    display: none;
    flex-direction: column;
    justify-content: space-around;
    padding: 10px;
    box-sizing: border-box;
    /* Hinzugefügte Transition für die neue Animation */
    transition: left 0.3s ease-in-out;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--text-color-dark);
    border-radius: 3px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-toggle.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.is-active span:nth-child(2) { opacity: 0; }
.menu-toggle.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Media Query for Mobile Optimizations */
@media (max-width: 768px) {
    .menu-toggle { display: flex; }
    
    /* HIER IST DIE ÄNDERUNG 2/2: Neue Regel, um den Button zu verschieben, wenn das Menü offen ist */
    .menu-toggle.is-active {
        left: 295px; /* 280px Breite der Box + 15px Abstand */
    }

    .controls-container {
        transform: translateX(-110%);
        transition: transform 0.3s ease-in-out;
        max-width: 280px; 
    }
    .controls-container.is-open { transform: translateX(0); }
}