html, body, #map {
    margin: 0;
    width: 100%;
    height: 100%;
}

#map {
    position: absolute;
    inset: 0;
}

body {
    overflow: hidden;
}

.hidden {
    display: none !important;
}

.map-fallback {
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    padding: 24px;
    font-family: sans-serif;
    color: #444;
}

.map-frame-pitch-toggle {
    width: 36px;
    min-width: 36px;
    font-weight: 700;
    font-size: 12px;
}

.maplibregl-ctrl-group button.map-frame-expand {
    width: 36px;
    min-width: 36px;
}

.maplibregl-ctrl-group button.map-frame-draw-start,
.maplibregl-ctrl-group button.map-frame-draw-undo,
.maplibregl-ctrl-group button.map-frame-draw-clear,
.maplibregl-ctrl-group button.map-frame-expand {
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-frame-expand {
    margin-left: 4px;
}

.maplibregl-ctrl-group button.map-frame-draw-start.active {
    background: #007bff;
    color: #fff;
}

.map-frame-drawing {
    cursor: crosshair;
}

#map .maplibregl-marker {
    position: absolute;
}

#map .marker {
    width: 65px;
    text-align: center;
    padding: 2px;
    background: #1e98ff;
    color: #fff;
    font-weight: bold;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .4);
    cursor: pointer;
    transition: opacity 0.18s ease;
}

#map .marker.marker-hidden {
    opacity: 0 !important;
    pointer-events: none !important;
}

#map .marker::after {
    bottom: -10px;
    position: absolute;
    content: '';
    left: 50%;
    width: 11px;
    height: 11px;
    transform: rotate(45deg) translateX(-50%);
    background: #1e98ff;
    border-right: 1px solid rgba(0, 0, 0, .1);
    border-bottom: 1px solid rgba(0, 0, 0, .1);
}

#map .marker.active,
#map .marker.active::after {
    background: #ed4543;
}

#map .marker.active {
    outline: 3px solid #ffcf33;
    outline-offset: 3px;
}

.maplibregl-popup {
    filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.38));
    animation: map-popup-fade-in 0.2s ease-out;
}

@keyframes map-popup-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.maplibregl-popup-content {
    padding: 0;
    overflow: hidden;
    border-radius: 6px;
    box-shadow: none;
    animation: map-popup-zoom-in 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: bottom center;
}

@keyframes map-popup-zoom-in {
    from {
        opacity: 0;
        transform: scale(0.88);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.maplibregl-popup-anchor-bottom .maplibregl-popup-tip {
    border-top-color: #fff;
}

.item-tooltip {
    display: block;
    width: 220px;
    cursor: pointer;
}

.item-tooltip .picture {
    position: relative;
    min-height: 48px;
    background: #ddd;
}

.item-tooltip .picture img {
    width: 100%;
    display: block;
    border-radius: 4px;
}

.item-tooltip .picture .title {
    position: absolute;
    top: 0;
    left: 0;
    height: 45px;
    background: linear-gradient(rgba(0, 0, 0, .75), rgba(0, 0, 0, 0));
    width: 100%;
}

.item-tooltip .picture .title .name {
    padding: 5px 0 0 5px;
    color: #fff;
    font-size: 14px;
    display: block;
}

#map button.marker {
    border: 0;
    font-family: inherit;
}
