/* --- GRUNDLAYOUT --- */
body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

#map {
    width: 100%;
    height: 100vh;
    z-index: 1;
}

/* --- SUCHFELD & DROPDOWN --- */
#search-box {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: white;
    padding: 8px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    display: flex;
    gap: 8px;
    width: 90%;
    max-width: 400px;
    box-sizing: border-box;
}

.search-input-wrapper {
    position: relative;
    flex-grow: 1;
}

#search-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px; 
    box-sizing: border-box;
}

#search-box button {
    padding: 10px 15px;
    background: #f1c40f;
    color: #333;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 15px;
}

/* Das Dropdown-Menü */
#search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 8px 15px rgba(0,0,0,0.15);
    z-index: 1001;
    max-height: 250px;
    overflow-y: auto;
    margin-top: 5px;
}

.dropdown-item {
    padding: 12px 10px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    line-height: 1.4;
    text-align: left;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: #f5f6fa;
}

/* Hilfsklasse zum Verstecken */
.hidden {
    display: none !important;
}

/* --- LEAFLET UI FIX --- */
.leaflet-top { top: 80px !important; }

/* --- INFO BUTTON & MODAL --- */
#info-btn {
    position: absolute;
    top: 90px; 
    right: 15px;
    z-index: 1000;
    background: #fff;
    border: 2px solid #eee;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

#info-modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 25px;
    border-radius: 16px;
    width: 85%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    line-height: 1.5;
    font-size: 15px;
    color: #333;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: #999;
}

/* --- POPUP DESIGN --- */
.popup-container { text-align: center; min-width: 220px; }
.popup-container h3 { margin: 0 0 10px 0; font-size: 17px; color: #222; }
.status-box { padding: 10px; border-radius: 8px; font-weight: bold; margin-bottom: 12px; font-size: 14px; }
.status-unknown { background: #f5f6fa; color: #718093; border: 1px solid #dcdde1; }
.status-high { background: #fff2cc; color: #d35400; border: 1px solid #ffeaa7; }
.status-medium { background: #dfe6e9; color: #2d3436; border: 1px solid #b2bec3; }
.status-low { background: #e3f2fd; color: #1976d2; border: 1px solid #bbdefb; }
.divider { border: 0; border-top: 1px solid #eee; margin: 12px 0; }
.popup-btn { display: block; width: 100%; margin: 6px 0; padding: 10px; border: none; border-radius: 6px; cursor: pointer; font-weight: bold; font-size: 14px; transition: opacity 0.2s; }
.popup-btn:active { opacity: 0.7; }
.btn-sun { background: #f1c40f; color: #fff; }
.btn-shade { background: #888888; color: #fff; }
.btn-no-outdoor { background: #e74c3c; color: #fff; }