/* ── Shared map control button ────────────────────────────────────────────── */

.map-ctrl-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0px;
    border-radius: 12px;
    background-color: var(--bs-secondary-bg);
    color: var(--bs-body-color);
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.22);
    transition: background-color 0.15s;
}

.map-ctrl-btn:hover {
    background-color: var(--bs-secondary-bg);
}

.map-ctrl-btn:active {
    background-color: var(--bs-tertiary-bg);
}

.map-ctrl-btn .material-icons {
    font-size: 20px;
    pointer-events: none;
}

/* ── Search Button ─────────────────────────────────────────────────────────── */

.search-btn {
    position: absolute;
    top: 10px;
    left: 58px;  /* 10px + 40px sidebar-toggle + 8px gap */
    z-index: 1000;
}

/* ── Filter Button ────────────────────────────────────────────────────────── */

.filter-btn {
    position: absolute;
    top: 10px;
    left: 106px;  /* search-btn (58) + 40px + 8px gap */
    z-index: 1000;
}

.filter-btn--active .material-icons {
    color: #3b82f6;
}

@media (pointer: coarse) {
    .search-btn {
        left: 66px; /* 10px + 48px sidebar-toggle + 8px */
    }

    .filter-btn {
        left: 122px; /* search-btn (66) + 48px + 8px */
    }
}

/* ── Zoom Controls ────────────────────────────────────────────────────────── */

.map-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
}

.map-controls .btn-group-vertical .map-ctrl-btn:first-child {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom: none;
}

.map-controls .btn-group-vertical .map-ctrl-btn:last-child {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

/* ── Routenplaner + Geolocate (bottom-right stack) ───────────────────────── */

.map-bottom-right-stack {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.map-bottom-right-stack .map-ctrl-btn {
    width: 52px !important;
    height: 52px !important;
    border-radius: 14px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22) !important;
}

.route-btn {
    background-color: var(--bs-primary) !important;
    color: #fff !important;
}

.route-btn:hover {
    background-color: var(--bs-primary) !important;
    filter: brightness(1.08);
    color: #fff !important;
}

.route-btn:active {
    background-color: var(--bs-primary) !important;
    filter: brightness(0.92);
}

.route-btn .material-icons {
    font-size: 24px !important;
    color: #fff !important;
}

.geolocate-btn .material-icons {
    font-size: 24px !important;
}

/* ── Hide default MapLibre UI elements ───────────────────────────────────── */

.maplibregl-ctrl-attrib {
    display: none !important;
}

.maplibregl-ctrl-geolocate {
    display: none !important;
}
/* ── Favorites Control ────────────────────────────────────────────── */

.fav-control {
    position: absolute;
    top: 98px;    /* below the 2-button zoom group (10 + 80 + 8) */
    right: 10px;
    z-index: 1000;
}

.fav-ctrl-btn .material-icons {
    color: var(--bs-body-color);
    font-size: 22px !important;
}

/* ── Vehicle List Control ─────────────────────────────────────────── */

.vlist-control {
    position: absolute;
    top: 146px;   /* below favorites (98 + 40 + 8) */
    right: 10px;
    z-index: 1000;
}

/* ── Mobile size overrides ────────────────────────────────────────── */

@media (pointer: coarse) {
    .map-ctrl-btn {
        width: 48px;
        height: 48px;
        border-radius: 14px;
    }

    .map-ctrl-btn .material-icons {
        font-size: 24px;
    }

    .fav-ctrl-btn .material-icons {
        font-size: 26px !important;
    }

    .fav-control {
        top: 114px;  /* 10 + 96 + 8 */
    }

    .vlist-control {
        top: 170px;  /* 114 + 48 + 8 */
    }
}