/* Controls of the shared position map, see js/location-map.js. */
.maplibregl-ctrl-group .map-locate-button {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  text-decoration: none;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  color: #111827;
  background: #fff;
}

.map-locate-icon {
  display: inline-block;
  transform: rotate(-45deg);
  transform-origin: center;
}

.layer-switch-control {
  background: transparent;
  border: 0;
  box-shadow: none;
}

.layer-switch-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 188px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-strong);
  padding: 3px;
  overflow: hidden;
}

.layer-switch-highlight {
  position: absolute;
  left: 3px;
  top: 3px;
  width: calc(50% - 3px);
  height: calc(100% - 6px);
  border-radius: 999px;
  border: 1px solid rgba(37, 99, 235, 0.35);
  background: var(--primary-soft);
  transition: transform var(--transition);
  pointer-events: none;
}

.layer-switch-track[data-active-layer="satellite"] .layer-switch-highlight {
  transform: translateX(100%);
}

.layer-switch-button {
  position: relative;
  z-index: 1;
  border: 0;
  background: transparent;
  color: var(--text-soft);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.87rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--transition);
}

.layer-switch-button.is-active {
  color: var(--primary-strong);
}

:root[data-theme="dark"] .maplibregl-ctrl-group .map-locate-button {
  color: #000000;
  background: #ffffff;
}

/* Maptoolkit logo, required at 24 px or more next to the attribution. */
.map-provider-logo {
  display: block;
  line-height: 0;
}

.map-provider-logo img {
  height: 24px;
  width: auto;
}

/* Shown instead of the map when WebGL 2 is missing. */
.map-unavailable {
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  color: var(--text-soft);
  background: var(--surface-sunk);
}
