/* Unerkundetes Gebiet: Nebel */
#map {
    background: #20242a;
}

body.nether #map {
    background: #2a1e1e;
}

#seitenleiste {
    position: absolute;
    top: 48px; /* darüber zeigt der Betrachter die Koordinaten unter dem Mauszeiger */
    right: 10px;
    width: 230px;
    max-width: calc(100vw - 70px);
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    padding: 8px 12px;
    border-radius: 6px;
    background: rgba(20, 24, 30, 0.88);
    color: #fff;
    font-size: 14px;
    line-height: 1.4;
}

#seitenleiste ul {
    margin: 4px 0;
    padding: 0;
    list-style: none;
}

#seitenleiste li {
    cursor: pointer;
}

#seitenleiste .ort {
    color: #b8c0cc;
    font-size: 12px;
}

#seitenleiste small {
    display: block;
    color: #8a93a0;
}

#ebenen {
    margin-top: 8px;
    border-top: 1px solid #3a414c;
    padding-top: 6px;
}

#ebenen summary {
    cursor: pointer;
    font-weight: bold;
}

#ebenen label {
    display: block;
    margin: 4px 0;
    cursor: pointer;
}

#ebenen button,
#ebenen input {
    font: inherit;
    font-size: 13px;
    border-radius: 4px;
    border: 1px solid #4a525e;
    background: #2b313a;
    color: #fff;
    padding: 3px 6px;
}

#ebenen button {
    cursor: pointer;
}

#ebenen button.aktiv,
#ebenen button[aria-checked="true"] {
    background: #3d7bd9;
    border-color: #3d7bd9;
}

.umschalter {
    display: flex;
    gap: 4px;
    margin: 6px 0;
}

.umschalter button {
    flex: 1;
}

#legende {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 8px;
    margin: -2px 0 4px 22px;
    font-size: 11px;
    color: #b8c0cc;
}

#legende span::before {
    content: "●";
    margin-right: 2px;
    color: var(--farbe);
}

#gehezu {
    display: flex;
    gap: 4px;
    margin: 8px 0 6px;
}

#gehezu input {
    width: 0;
    flex: 1;
}

#messen {
    width: 100%;
}

#seitenleiste .zurueck {
    display: block;
    margin-bottom: 4px;
    color: #7fb4ff;
    font-size: 13px;
    text-decoration: none;
}

/* Große, gut sichtbare Zoom-Knöpfe – auch zum Tippen am Handy */
.ol-zoom.ol-control {
    top: 12px;
    left: 12px;
    padding: 0;
    background: none;
}

.ol-zoom.ol-control button {
    width: 46px;
    height: 46px;
    margin: 0;
    font-size: 28px;
    line-height: 1;
    color: #fff;
    background: rgba(20, 24, 30, 0.88);
    border: 1px solid #4a525e;
}

.ol-zoom.ol-control .ol-zoom-in {
    border-radius: 10px 10px 0 0;
}

.ol-zoom.ol-control .ol-zoom-out {
    border-top: none;
    border-radius: 0 0 10px 10px;
}

.ol-zoom.ol-control button:hover,
.ol-zoom.ol-control button:focus-visible {
    background: #3d7bd9;
}

/* Handy: Seitenleiste als Leiste am unteren Rand, keine Mauskoordinaten */
@media (max-width: 640px) {
    #seitenleiste {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: auto;
        max-width: none;
        max-height: 55vh;
        border-radius: 14px 14px 0 0;
        padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    }

    #seitenleiste ul {
        display: flex;
        flex-wrap: wrap;
        gap: 2px 14px;
    }

    #seitenleiste li {
        padding: 4px 0;
    }

    #ebenen label {
        padding: 4px 0;
    }

    /* 16px verhindert, dass iPhones beim Tippen ins Feld hineinzoomen */
    #ebenen input,
    #ebenen button {
        font-size: 16px;
        padding: 6px 8px;
    }

    .ol-scale-bar,
    .ol-scale-line {
        display: none;
    }
}

@media (hover: none) {
    .ol-mouse-position {
        display: none;
    }
}
