/* Map block. Leaflet's own styles come first (vendor/leaflet/leaflet.css). */
.map__canvas {
  display: none;
  isolation: isolate; /* Leaflet uses high z-index values inside; they must not cover menus */
  width: 100%;
  border-radius: var(--radius);
  background: var(--surface);
}
.map--live .map__canvas {
  display: block;
}
.map--small .map__canvas {
  height: 240px;
}
.map--medium .map__canvas {
  height: 380px;
}
.map--large .map__canvas {
  height: 560px;
}
/* With the map working, the list of places is for screen readers only; without it, it is the content. */
.map--live .map__places {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.map__places {
  margin: 0.5rem 0;
  padding-left: 1.2rem;
}
.map-pin span {
  display: block;
  box-sizing: border-box;
  background: var(--primary);
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
}
.map-pin--accent span {
  background: var(--accent);
}
.map-pin--dark span {
  background: var(--text);
}
.map-pin--dot span {
  width: 24px;
  height: 24px;
  border: 3px solid #ffffff;
  border-radius: 50%;
}
/* The classic pin: a rounded square turned so one corner points down, with a white dot in it. */
.map-pin--drop span {
  position: relative;
  width: 30px;
  height: 30px;
  border: 2px solid #ffffff;
  border-radius: 50% 50% 50% 0;
  transform: translateY(2px) rotate(-45deg);
}
.map-pin--drop span::after {
  content: '';
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: #ffffff;
}
/* Three styles are the standard map recoloured here, so they need no other map service. */
.map--style-grayscale .leaflet-tile-pane {
  filter: grayscale(1);
}
.map--style-light .leaflet-tile-pane {
  filter: grayscale(1) brightness(1.25) contrast(0.6);
}
.map--style-dark .leaflet-tile-pane {
  filter: invert(1) hue-rotate(180deg) grayscale(0.4) brightness(0.9) contrast(0.95);
}
.map--style-dark .map__canvas {
  background: #262626;
}
.leaflet-container a {
  color: var(--link);
}
