.trip-map-canvas {
  --trip-home: #204838;
  --trip-live: #1b61ab;
  width: 100%;
  height: clamp(230px, 61vw, 370px);
  overflow: hidden;
  isolation: isolate;
  border: 1px solid #dce5dc;
  border-radius: 18px;
  background-color: #edf2eb;
  background-image: linear-gradient(#dfe8dc 1px, transparent 1px), linear-gradient(90deg, #dfe8dc 1px, transparent 1px);
  background-size: 36px 36px;
}
.trip-map-canvas[hidden], .trip-map-key[hidden], .trip-map-tile-status[hidden] { display: none; }
.trip-map-canvas .leaflet-tile-pane { filter: saturate(.68) contrast(.96) brightness(1.025); }

.trip-map-canvas .leaflet-control-zoom,
.trip-map-canvas .trip-map-center {
  margin: 10px 10px 0 0;
  border: 1px solid #c9d6d0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 3px 12px #21443424;
  color: var(--trip-home);
}
.trip-map-canvas .leaflet-control-zoom a,
.trip-map-canvas .trip-map-center {
  width: 44px;
  height: 44px;
}
.trip-map-canvas .leaflet-control-zoom a { color: var(--trip-home); font: 500 24px/43px system-ui, sans-serif; }
.trip-map-canvas .leaflet-control-zoom a:first-child { border-radius: 11px 11px 0 0; border-bottom-color: #dce5df; }
.trip-map-canvas .leaflet-control-zoom a:last-child { border-radius: 0 0 11px 11px; }
.trip-map-canvas .leaflet-control-zoom .leaflet-disabled { color: #69766f; background: #f2f5f2; }
.trip-map-canvas .trip-map-center { display: grid; place-items: center; padding: 0; cursor: pointer; }
.trip-map-canvas .trip-map-center > span {
  position: relative;
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 50%;
}
.trip-map-canvas .trip-map-center > span::before,
.trip-map-canvas .trip-map-center > span::after {
  position: absolute;
  inset: 50% auto auto 50%;
  content: '';
  transform: translate(-50%, -50%);
}
.trip-map-canvas .trip-map-center > span::before {
  width: 3px;
  height: 3px;
  border-radius: 1px;
  box-shadow: -9px 0 currentColor, 9px 0 currentColor, 0 -9px currentColor, 0 9px currentColor;
}
.trip-map-canvas .trip-map-center > span::after { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.trip-map-canvas .leaflet-control-zoom a:focus-visible,
.trip-map-canvas .trip-map-center:focus-visible { outline: 2px solid #285f8d; outline-offset: -3px; }
.trip-map-canvas .leaflet-control-zoom a:hover:not(.leaflet-disabled),
.trip-map-canvas .trip-map-center:hover { background: #f0f6f0; }
.trip-map-canvas .leaflet-control-attribution { padding: 2px 6px; border-radius: 6px 0 0; background: #ffffffea; color: #344846; }
.trip-map-canvas .leaflet-control-attribution a { color: #254f73; }

.trip-map-pin { display: grid; place-items: center; background: transparent; border: 0; }
.trip-map-pin--destination::before {
  content: '';
  width: 26px;
  height: 26px;
  border: 2px solid white;
  border-radius: 50% 50% 50% 5px;
  background: var(--trip-home);
  box-shadow: 0 3px 10px #17362e65;
  transform: rotate(-45deg);
}
.trip-map-pin--destination::after {
  position: absolute;
  content: '';
  width: 9px;
  height: 9px;
  margin-top: -3px;
  border-radius: 50%;
  background: #fff;
}
.trip-map-pin--partner::before {
  content: '';
  width: 18px;
  height: 18px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--trip-live);
  box-shadow: 0 0 0 6px #276db94a, 0 3px 9px #17377055;
}

.trip-map-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 9px 2px 0;
}
.trip-map-key {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #374c43;
  font-size: .78rem;
  font-weight: 650;
}
.trip-map-key::before {
  content: '';
  width: 9px;
  height: 9px;
  border-radius: 50% 50% 50% 3px;
  background: #204838;
  transform: rotate(-45deg);
}
.trip-map-key--partner::before {
  border-radius: 50%;
  background: #1b61ab;
  box-shadow: 0 0 0 2px #d8e9f8;
  transform: none;
}
.trip-map-tile-status { margin: 8px 0 0; font-size: .8rem; color: #4b5b52; line-height: 1.4; }

@media (prefers-contrast: more) {
  .trip-map-canvas .leaflet-tile-pane { filter: none; }
}
