/*
* Diese Datei wurde mit hilfe von GEMINI PRO erstellt, 
* da meinen eigegen CSS Skills nicht gereicht haben mein Konzept
* schon in HTML und CSS umzusetzen. 
* Weil mir aber einer wirklich darstellung der Daten wichtig war 
* habe ich mich deshalt trotzdem gegen Figma entschieden habe.
*/

@import url(style.css);

.map-section-full {
    display: flex;
    height: 100vh; /* Nimmt den ganzen Bildschirm ein */
    background-color: #2b2118;
    position: relative;
    overflow: hidden;
}

/* --- Sidebar Styling --- */
.map-sidebar {
    width: 350px; /* Feste Breite für Filter */
    background: rgba(43, 33, 24, 0.95); /* Fast deckend dunkel */
    backdrop-filter: blur(10px);
    border-right: 1px solid rgba(255,255,255,0.1);
    display: flex;
    flex-direction: column;
    color: white;
    z-index: 10;
    flex-shrink: 0; /* Sidebar darf nicht schrumpfen */
    box-shadow: 5px 0 30px rgba(0,0,0,0.5);
}

.sidebar-header {
    padding: 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h3 { margin: 0; font-family: var(--font-heading); }
.sidebar-header p { margin: 0; opacity: 0.6; font-size: 0.9rem; }

/* Scrollbarer Bereich für viele Filter */
.filter-scroll-area {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
}

/* Filter Gruppen */
.filter-group { margin-bottom: 1.5rem; }
.filter-group label {
    display: block;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    color: var(--color-accent);
    font-weight: 700;
}

.filter-divider {
    border: 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin: 2rem 0;
}

/* Inputs Organisch */
.organic-input {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    padding: 10px;
    border-radius: 8px;
    font-family: var(--font-body);
    outline: none;
    transition: all 0.2s;
}

.organic-input:focus {
    background: rgba(255,255,255,0.1);
    border-color: var(--color-accent);
}

.organic-input option { background: #333; }

/* Min/Max Felder nebeneinander */
.range-inputs {
    display: flex;
    gap: 10px;
}

.organic-input.small { text-align: center; }

/* Reset Button */
.btn-reset {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 1px dashed rgba(255,255,255,0.3);
    color: rgba(255,255,255,0.6);
    border-radius: 8px;
    cursor: pointer;
    margin-top: 1rem;
    transition: all 0.2s;
}
.btn-reset:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 1rem 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    opacity: 0.5;
    font-size: 0.8rem;
    text-align: center;
}

.multi-select-wrapper {
    min-height: 45px;
    height: auto; /* Wächst mit den Tags */
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    cursor: text;
}

/* Das eigentliche Input Feld (unsichtbar im Wrapper) */
#species-multi-search {
    background: transparent;
    border: none;
    color: white;
    font-family: var(--font-body);
    font-size: 0.9rem;
    flex: 1; /* Nimmt restlichen Platz */
    min-width: 100px;
    outline: none;
    padding: 5px 0;
}

#species-multi-search::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Die grünen Tags (Chips) */
.tag-chip {
    background: var(--color-forest-light);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 5px;
    animation: popIn 0.2s ease;
}

.tag-remove {
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    opacity: 0.7;
    line-height: 0.8;
}

.tag-remove:hover {
    opacity: 1;
    color: var(--color-accent);
}

@keyframes popIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Anpassung der Vorschlagsliste für die Sidebar */
#map-suggestions {
    position: relative; /* ÄNDERUNG: Vorher absolute */
    width: 100%;
    /* Keine max-height Begrenzung erzwingen, oder großzügig lassen */
    max-height: 300px; 
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.05); /* Leicht anders als Hintergrund */
    border: 1px solid rgba(255,255,255,0.2);
    border-top: none;
    border-radius: 0 0 8px 8px;
    margin-top: -2px; /* Damit es direkt am Input klebt */
    z-index: 50;
}

/* Wenn versteckt, ganz wegnehmen damit kein Platz verbraucht wird */
#map-suggestions.hidden {
    display: none; 
}

#map-suggestions li {
    padding: 10px 15px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    cursor: pointer;
    color: rgba(255,255,255,0.8);
}

#map-suggestions li:hover {
    background: var(--color-forest);
    color: white;
}

/* --- Die Karte --- */
.map-frame-full {
    flex: 1; /* Nimmt den restlichen Platz ein */
    height: 100%;
    background: #111; /* Fallback */
}

/* Responsive: Auf Handy Sidebar unter Karte */
@media (max-width: 900px) {
    .map-section-full { flex-direction: column-reverse; height: auto; }
    .map-sidebar { width: 100%; height: auto; }
    .map-frame-full { height: 60vh; }
}

/* Leaflet Customization (Popups organisch machen) */
.leaflet-popup-content-wrapper {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    font-family: var(--font-body);
}

.leaflet-popup-tip {
    background: rgba(255, 255, 255, 0.95);
}

.popup-title {
    font-family: var(--font-heading);
    color: var(--color-forest);
    font-weight: 700;
    margin-bottom: 5px;
    display: block;
    font-size: 1.1rem;
}

/* === MARKER CLUSTER STYLING (Organic) === */

.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
    background-color: rgba(45, 106, 79, 0.6); /* Waldgrün transparent */
}

.marker-cluster div {
    width: 30px;
    height: 30px;
    margin-left: 5px;
    margin-top: 5px;
    text-align: center;
    border-radius: 50%;
    font-family: var(--font-heading);
    color: white;
    font-weight: bold;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-forest); /* Füllung */
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    border: 2px solid rgba(255,255,255,0.3);
}

/* Größenunterschiede (Optional: Farbnuancen) */
.marker-cluster-medium div {
    background-color: #40916C; /* Etwas heller */
}

.marker-cluster-large div {
    background-color: #52B788; /* Noch heller für riesige Cluster */
    color: var(--color-text);
}