.ax-location-map {
  width: 100%;
  min-width: 0;
  display: grid;
  gap: var(--ax-2);
}

.ax-location-map__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--ax-2);
}

.ax-location-map__toolbar > p {
  flex: 1 1 240px;
}

.ax-location-map__frame {
  position: relative;
  isolation: isolate;
  border: 1px solid var(--ax-border);
  background: var(--ax-gray-10);
}

.ax-location-map__canvas {
  width: 100%;
  height: 520px;
  font-family: var(--ax-font);
  background: var(--ax-gray-10);
}

.ax-location-map .leaflet-control-zoom.leaflet-bar a {
  width: 44px;
  height: 44px;
  line-height: 44px;
  color: var(--ax-gray-01);
  background: var(--ax-gray-12);
  border-radius: 0;
  text-decoration: none;
}

.ax-location-map .leaflet-bar,
.ax-location-map .leaflet-popup-content-wrapper {
  border-radius: 0;
  box-shadow: none;
}

.ax-location-map .leaflet-control-attribution {
  max-width: 100%;
  padding: 4px 8px;
  color: var(--ax-gray-02);
  background: rgb(255 255 255 / 95%);
  font-size: 11px;
  line-height: 1.6;
  text-wrap: pretty;
}

.ax-location-map .leaflet-control-attribution a {
  color: var(--ax-green-03);
  text-decoration: underline;
}

.ax-location-map__marker {
  display: grid;
  place-items: center;
  background: transparent;
  border: 0;
}

.ax-location-map__pin {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 2px solid var(--ax-gray-12);
  border-radius: 50%;
  color: var(--ax-gray-12);
  background: var(--ax-green-03);
}

.ax-location-map__pin::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.ax-location-map__marker--selected .ax-location-map__pin {
  outline: 3px solid var(--ax-gray-01);
  outline-offset: 2px;
  background: var(--ax-green-05);
}

.ax-location-map a:focus-visible,
.ax-location-map button:focus-visible,
.ax-location-map summary:focus-visible,
.ax-location-map .ax-location-map__marker:focus-visible,
.ax-location-map__canvas:focus-visible {
  outline: 3px solid var(--ax-green-05);
  outline-offset: 3px;
}

.ax-location-map .leaflet-popup-content-wrapper,
.ax-location-map .leaflet-popup-tip {
  color: var(--ax-gray-01);
  background: var(--ax-gray-12);
}

.ax-location-map .leaflet-popup-content {
  margin: 48px 20px 20px;
  max-width: min(280px, calc(100vw - 144px));
  max-height: min(280px, 52dvh);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  font-family: var(--ax-font);
  font-size: 15px;
  line-height: 1.45;
  white-space: normal;
}

.ax-location-map .leaflet-container a.leaflet-popup-close-button {
  width: 44px;
  height: 44px;
  color: var(--ax-gray-01);
  font-size: 26px;
  line-height: 44px;
  text-decoration: none;
}

.ax-location-map__popup {
  display: grid;
  gap: var(--ax-3);
}

.ax-location-map__popup-entry {
  display: grid;
  gap: var(--ax-1);
}

.ax-location-map__popup-entry + .ax-location-map__popup-entry {
  border-top: 1px solid var(--ax-border);
  padding-top: var(--ax-3);
}

.ax-location-map .ax-location-map__popup-entry h3 {
  margin: 0;
  color: var(--ax-gray-01);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.ax-location-map .ax-location-map__popup-entry p,
.ax-location-map .ax-location-map__popup-entry address {
  margin: 0;
  color: var(--ax-gray-03);
  font-style: normal;
  overflow-wrap: anywhere;
}

.ax-location-map__popup-actions {
  display: grid;
}

.ax-location-map .ax-location-map__popup-actions a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding-block: var(--ax-1);
  color: var(--ax-green-03);
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.ax-location-map .ax-location-map__popup-actions a:hover {
  color: var(--ax-gray-01);
  text-decoration-thickness: 2px;
}

.ax-location-map__notice {
  position: absolute;
  z-index: 500;
  inset: 50% 24px auto;
  transform: translateY(-50%);
  padding: 24px;
  background: var(--ax-gray-12);
  color: var(--ax-gray-01);
  text-align: center;
  pointer-events: none;
}

.ax-location-map__warning {
  padding: var(--ax-2);
  border-left: 2px solid var(--ax-green-05);
}

.ax-location-map__sources {
  color: var(--ax-gray-03);
}

.ax-location-map__sources summary {
  min-height: 44px;
  padding-block: 12px;
  cursor: pointer;
}

.ax-location-map__sources a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ax-green-03);
  text-decoration: underline;
}

@media (max-width: 600px) {
  .ax-location-map__canvas { height: 420px; }
  .ax-location-map__toolbar .ax-btn { width: 100%; }
  .ax-location-map .leaflet-control-attribution { font-size: 10px; }
}
