.figma-map-selection {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 850;
  width: var(--figma-map-selection-width, min(610px, calc(100vw - 48px)));
  max-width: calc(100% - 24px);
  max-height: min(var(--figma-map-selection-height, 430px), calc(100% - 24px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 18px;
  background: var(--navy, #13233b);
  box-shadow: 0 26px 70px rgba(11, 23, 40, .35);
  box-sizing: border-box;
  color: #fff;
  pointer-events: auto;
  transform: translate(-50%, -50%);
}

.figma-map-selection--single {
  width: var(--figma-map-selection-width, min(340px, calc(100vw - 48px)));
}

.figma-map-selection__body,
.figma-map-selection__body > .catalog-map-cluster-balloon,
.figma-map-selection__body > .catalog-map-balloon {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

/* One scroll area keeps links reachable even when the map is collapsed. */
.figma-map-selection__body {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(233, 227, 204, .38) transparent;
}

.figma-map-selection__close {
  position: absolute;
  top: 11px;
  right: 11px;
  z-index: 2;
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font: 300 27px/1 Arial, sans-serif;
  cursor: pointer;
  place-items: center;
}

.has-figma-map-selection .map-button {
  z-index: 900;
}

.has-figma-map-cluster-selection .map-button {
  right: 64px;
}

.figma-map-selection--cluster .catalog-map-cluster-balloon {
  max-height: none;
}

.figma-map-selection--cluster .catalog-map-cluster-balloon__grid {
  max-height: none;
  overflow: visible;
}

.figma-map-selection__close:hover {
  background: rgba(255, 255, 255, .22);
}

.figma-map-selection__close:focus-visible {
  background: rgba(255, 255, 255, .22);
  outline: 0;
  box-shadow: none;
}

@media (max-width: 767px) {
  .figma-map-selection {
    width: min(var(--figma-map-selection-width, calc(100vw - 36px)), calc(100vw - 36px));
    max-height: min(var(--figma-map-selection-height, 430px), calc(100% - 24px), calc(100vh - 96px));
  }

  .figma-map-selection--single {
    width: min(var(--figma-map-selection-width, 340px), 340px, calc(100vw - 36px));
  }
}
