/* Map / satellite thumbnail switch (basemap-toggle.js). Sits in MapLibre's
   bottom-right control corner, directly above the credit line. */

.maplibregl-ctrl.basemap-toggle-ctrl {
    pointer-events: auto;
}

.basemap-toggle {
    position: relative;
    display: block;
    width: 60px;
    height: 60px;
    padding: 0;
    overflow: hidden;
    border: 2px solid #fff;
    border-radius: 8px;
    background: #e4e7ec;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
    cursor: pointer;
}

.basemap-toggle img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.15s ease;
}

.basemap-toggle img[hidden] {
    display: none;
}

.basemap-toggle:hover img {
    transform: scale(1.08);
}

.basemap-toggle-label {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 2px 0 3px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.62));
    color: #fff;
    font: 600 10px/1.2 system-ui, sans-serif;
    letter-spacing: 0.02em;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.basemap-toggle:focus-visible {
    outline: 2px solid #1a73e8;
    outline-offset: 2px;
}

@media (max-width: 600px) {
    .basemap-toggle {
        width: 48px;
        height: 48px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .basemap-toggle img {
        transition: none;
    }
}
