/* Route map (Leaflet). Leaflet's own stylesheet is loaded by map.js, only when a map is on the page. */

.route-map {
    width: 100%;
    min-height: 280px;
    background-color: #e9ecef;
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: 0.5rem;
    position: relative;
    /* Leaflet panes use z-indexes up to 1000: keep them below the navbar, dropdowns and modals. */
    isolation: isolate;
    z-index: 0;
}

.rm-marker-wrap {
    background: none;
    border: 0;
}

.rm-marker {
    display: block;
    width: 30px;
    height: 30px;
    text-align: center;
    font-size: 26px;
    line-height: 30px;
    /* Only the emoji is shown; a white outline keeps it readable on the map. */
    filter: drop-shadow(0 0 1px #fff) drop-shadow(0 0 2px #fff);
}

.rm-control {
    background: #fff;
    color: #212529;
    border-radius: 0.375rem;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.4);
    padding: 0.4rem 0.6rem;
    font-size: 0.875rem;
}

.rm-legend-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    cursor: pointer;
    white-space: nowrap;
}

.rm-legend-symbol {
    font-size: 1rem;
}

.rm-locate-button {
    border: 0;
    background: none;
    padding: 0.1rem 0;
    font: inherit;
    font-weight: 600;
    color: #0d6efd;
    cursor: pointer;
}

.rm-locate-status {
    color: #b02a37;
    font-size: 0.75rem;
}

.rm-popup {
    min-width: 12rem;
    max-width: 18rem;
}

.rm-popup-kind {
    color: #6c757d;
    font-size: 0.8rem;
}

.rm-popup-text {
    margin: 0.4rem 0;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.rm-popup-links {
    display: flex;
    gap: 1rem;
    margin-top: 0.4rem;
}

.rm-error {
    margin: 0;
    padding: 1rem;
    color: #842029;
}

/* Other routes shown for orientation in the editor: small name tag in the middle of the faint area. */
.rm-context-label {
    background: rgba(255, 255, 255, 0.75);
    border: 0;
    box-shadow: none;
    color: #495057;
    font-size: 0.75rem;
    padding: 0.05rem 0.35rem;
}

.rm-context-label::before {
    display: none;
}
