/* Keep GL JS's distance calculation and bearing interactions, with ornaments
   styled like the mobile map. Important rules override the adapter's inline
   scale colors, which otherwise turn the entire label into a solid block. */
.mapboxgl-map {
  /* Contain Mapbox's control z-indices within its Flutter platform view so
     they cannot paint above Flutter sheets and dialogs. */
  isolation: isolate;
}

.mapboxgl-map .mapboxgl-ctrl-scale {
  position: relative;
  box-sizing: border-box;
  height: 22px;
  padding: 0 0 7px;
  border: 0 !important;
  background: transparent !important;
  color: white !important;
  font: 11px/15px sans-serif;
  text-align: center;
  text-shadow: 0 1px 2px black, 0 0 2px black;
}

.mapboxgl-map .mapboxgl-ctrl-scale::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 4px;
  box-sizing: border-box;
  border: 1px solid #172433;
  background: linear-gradient(to right,
    white 0% 25%, #172433 25% 50%,
    white 50% 75%, #172433 75% 100%);
}

.mapboxgl-ctrl-group:has(> .mapboxgl-ctrl-compass) {
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px #0006;
  overflow: hidden;
}

.mapboxgl-ctrl-group > .mapboxgl-ctrl-compass {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.mapboxgl-map .mapboxgl-ctrl button.mapboxgl-ctrl-compass .mapboxgl-ctrl-icon {
  background-image: url("icons/map-compass.svg") !important;
  background-size: 28px 28px;
}
