.mdsn-basemap {
  position: relative;
  width: 100%;
  height: var(--mdsn-map-height, 500px);
  min-height: 320px;
  overflow: hidden;
  background: #eef1f2;
  cursor: grab;
  user-select: none;
  touch-action: none;
  outline: none;
}

.mdsn-basemap:focus-visible {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-highlight, #004D8C) 35%, transparent);
}

.mdsn-basemap.is-dragging {
  cursor: grabbing;
}

.mdsn-basemap__tiles {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.mdsn-basemap__tile {
  position: absolute;
  width: 256px;
  height: 256px;
  max-width: none;
  border: 0;
  pointer-events: none;
  -webkit-user-drag: none;
}

.mdsn-basemap__marker {
  position: absolute;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.mdsn-basemap__marker-dot {
  display: block;
  width: 24px;
  height: 24px;
  border: 4px solid #fff;
  border-radius: 50%;
  background: var(--color-highlight, #004D8C);
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.28);
}

.mdsn-basemap__marker-label {
  margin-top: 8px;
  padding: 6px 10px;
  max-width: 240px;
  background: #fff;
  color: var(--color-secondary, #333);
  font-size: 14px;
  line-height: 1.25;
  text-align: center;
  box-shadow: 0 2px 10px rgb(0 0 0 / 0.16);
}

.mdsn-basemap__controls {
  position: absolute;
  z-index: 30;
  top: 16px;
  left: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 10px rgb(0 0 0 / 0.16);
}

.mdsn-basemap__controls button {
  width: 42px;
  height: 42px;
  border: 0;
  border-bottom: 1px solid #ddd;
  background: #fff;
  color: #222;
  font: inherit;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.mdsn-basemap__controls button:last-child {
  border-bottom: 0;
}

.mdsn-basemap__controls button:hover,
.mdsn-basemap__controls button:focus-visible {
  background: #f4f4f4;
}

.mdsn-basemap__attribution {
  position: absolute;
  z-index: 30;
  right: 0;
  bottom: 0;
  padding: 4px 7px;
  background: rgb(255 255 255 / 0.88);
  color: #333;
  font-size: 11px;
  line-height: 1.2;
}

.mdsn-basemap__attribution a {
  color: inherit;
  text-decoration: underline;
}

@media (max-width: 640px) {
  .mdsn-basemap {
    height: min(var(--mdsn-map-height, 500px), 70vh);
  }

  .mdsn-basemap__marker-label {
    max-width: 180px;
    font-size: 12px;
  }
}
