.map-view {
  isolation: isolate;
  border-color: var(--line);
  background: var(--surface);
}

.map-view > .map-base,
.map-view > .map-ink,
.map-view > .map-vehicles {
  position: absolute;
  inset: 0;
}

.map-view > .map-base {
  z-index: 0;
  pointer-events: none;
}

.map-base[data-visible="false"] {
  visibility: hidden;
}

.map-view > .map-ink {
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}

.map-ink.coordinate-picker-map { cursor: crosshair; }
.map-ink[data-dragging="true"] { cursor: grabbing; }
.map-ink:focus-visible { outline-offset: -3px; }
.map-view > .map-vehicles { z-index: 2; pointer-events: none; }

.map-view > .map-tools {
  z-index: 3;
  position: absolute;
  inset: .75rem .75rem auto auto;
  display: grid;
  gap: .45rem;
  align-content: start;
}

.map-zoom {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.map-tools .map-control {
  display: grid;
  place-items: center;
  width: 40px;
  min-width: 40px;
  height: 39px;
  min-height: 39px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
  font-size: 1.21rem;
  font-weight: 600;
  line-height: 1;
}

.map-tools .map-control[hidden] { display: none; }
.map-zoom .map-control { border: 0; border-radius: 0; }
.map-zoom .map-control + .map-control { border-top: 1px solid var(--line); }
.map-zoom .map-control:focus-visible { outline-offset: -3px; }
.map-tools .map-control:hover, .map-tools .map-control[aria-pressed="true"] { background: var(--selected); }

.map-view > .map-caption, .map-view > .map-scale, .map-view > .map-attribution {
  z-index: 3;
  position: absolute;
  color: var(--ink);
  background: var(--surface);
}

.map-view > .map-caption {
  inset: .75rem auto auto .75rem;
  max-width: calc(100% - 4.5rem);
  padding: .35rem .55rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  pointer-events: none;
}

.map-view > .map-scale {
  inset: auto auto .7rem .75rem;
  min-width: 26px;
  border: 1px solid var(--muted);
  border-top: 0;
  text-align: center;
  font-size: .69rem;
  line-height: 1.5;
  pointer-events: none;
}

.map-view > .map-attribution {
  inset: auto .38rem .26rem auto;
  padding: .12rem .3rem;
  border-radius: 4px;
  font-size: .68rem;
  text-decoration: none;
}

.map-view > .map-attribution:hover { text-decoration: underline; }

@media (pointer: coarse) {
  .map-tools .map-control { width: 44px; min-width: 44px; height: 44px; min-height: 44px; }
}
