.leaflet-container {
  background: #e9eef0;
  background-image:
    linear-gradient(#dfe6e9 1px, transparent 1px),
    linear-gradient(90deg, #dfe6e9 1px, transparent 1px);
  background-size: 32px 32px;
  font-family: inherit;
}

.leaflet-container .maplibregl-map,
.leaflet-container .maplibregl-canvas-container {
  pointer-events: none;
}

.leaflet-california-mask-pane {
  z-index: 350;
  pointer-events: none;
}

.has-scoped-basemap .leaflet-california-mask-pane {
  visibility: hidden;
}

.leaflet-trip-route-arrows-pane {
  z-index: 540;
  pointer-events: none;
}

.leaflet-trip-leg-labels-pane {
  z-index: 580;
}

.leaflet-container .leaflet-control-attribution {
  background: rgba(255, 255, 255, 0.92);
  color: #374d63;
  font-size: 10px;
  padding: 2px 6px;
}

.leaflet-container .leaflet-control-attribution a {
  color: #244e76;
}

.trip-pin,
.trip-city {
  display: grid;
  align-items: center;
  justify-items: center;
  box-sizing: border-box;
  border: 2px solid #fff;
  border-radius: 100px;
  box-shadow: 0 2px 8px rgba(18, 42, 68, 0.25);
  font-size: 0.8125rem;
  font-weight: 750;
  text-align: center;
}

.trip-pin {
  background: #184d7a;
  color: #fff;
}

.trip-pin.is-area {
  border: 2px dashed #295f86;
  background: #f2f8fc;
  color: #19476d;
}

.trip-pin.is-airport {
  background: #654886;
  color: #fff;
}

.trip-pin.is-attraction {
  background: #19645c;
  color: #fff;
}

.trip-attraction-label {
  position: absolute;
  top: 50%;
  left: calc(100% + 6px);
  max-width: 168px;
  padding: 3px 7px;
  border: 1px solid #8db3aa;
  border-radius: 6px;
  background: #f9fefc;
  box-shadow: 0 1px 4px rgba(16, 50, 44, 0.2);
  color: #174c46;
  transform: translateY(-50%);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.trip-attraction-label[data-side="left"] {
  right: calc(100% + 6px);
  left: auto;
}

.trip-attraction-label[hidden] {
  display: none;
}

.trip-city {
  background: #fff;
  color: #18476e;
  border-color: #b7cadb;
  white-space: nowrap;
}

.trip-pin.is-active,
.trip-city.is-active {
  box-shadow: 0 0 0 3px #163e65, 0 2px 10px rgba(18, 42, 68, 0.31);
}

.trip-pin:focus-visible,
.trip-city:focus-visible {
  outline: 3px solid #23223a;
  outline-offset: 4px;
}

.trip-leg-hit {
  cursor: pointer;
}

.trip-leg-hit:focus-visible {
  outline: none;
  stroke: #174c78;
  stroke-opacity: 0.25;
}

.trip-leg-anchor[hidden] {
  display: none;
}

.trip-leg-label,
.trip-leg-fallback {
  border: 1px solid #8da9bb;
  border-radius: 6px;
  padding: 5px 7px;
  background: #fffeff;
  box-shadow: 0 1px 4px #183a5729;
  color: #163e65;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.trip-leg-label {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%);
  white-space: nowrap;
}

.trip-leg-fallback {
  position: absolute;
  z-index: 610;
  top: 13px;
  left: 12px;
  max-width: calc(100% - 80px);
  min-height: 40px;
  text-align: left;
}

.trip-leg-anchor[data-side="left"] .trip-leg-label {
  left: calc(-1 * var(--leg-offset));
  transform: translate(-100%, -50%);
}

.trip-leg-anchor[data-side="right"] .trip-leg-label {
  left: var(--leg-offset);
  transform: translateY(-50%);
}

.trip-leg-anchor[data-side="above"] .trip-leg-label {
  top: calc(-1 * var(--leg-offset));
  transform: translate(-50%, -100%);
}

.trip-leg-anchor[data-side="below"] .trip-leg-label {
  top: var(--leg-offset);
  transform: translateX(-50%);
}

.trip-leg-anchor:is([data-side="left"], [data-side="right"]) .trip-leg-label::after {
  content: "";
  position: absolute;
  top: 50%;
  width: var(--leg-offset);
  border-top: 1px solid #6f8fa6;
  pointer-events: none;
}

.trip-leg-anchor:is([data-side="above"], [data-side="below"]) .trip-leg-label::after {
  content: "";
  position: absolute;
  left: 50%;
  height: var(--leg-offset);
  border-left: 1px solid #6f8fa6;
  pointer-events: none;
}

.trip-leg-anchor[data-side="left"] .trip-leg-label::after {
  left: 100%;
}

.trip-leg-anchor[data-side="right"] .trip-leg-label::after {
  right: 100%;
}

.trip-leg-anchor[data-side="above"] .trip-leg-label::after {
  top: 100%;
}

.trip-leg-anchor[data-side="below"] .trip-leg-label::after {
  bottom: 100%;
}

.trip-leg-anchor:focus-visible .trip-leg-label,
.trip-leg-label:hover,
.trip-leg-fallback:is(:focus-visible, :hover) {
  outline: 2px solid #163e65;
  outline-offset: 1px;
}

.trip-leg-popup {
  position: absolute;
  z-index: 700;
  left: 9px;
  bottom: 25px;
  display: flex;
  width: min(18.5rem, calc(100% - 65px));
  max-height: calc(100% - 40px);
  border: 1px solid #adc1ca;
  border-radius: 9px;
  background: #fff;
  color: #20384b;
  box-shadow: 0 5px 20px #173a5833;
}

.trip-leg-popup-close {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 5px;
  background: #f1f6f8;
  color: #163e65;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
}

.trip-leg-popup-content {
  width: 100%;
  min-width: 0;
  padding: 11px 43px 11px 12px;
  overflow: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  font-size: 0.82rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.trip-leg-popup-title {
  display: block;
  padding-inline-end: 4px;
  color: #1c364d;
  font-size: 0.9rem;
}

.trip-leg-popup-order {
  display: block;
  margin-bottom: 2px;
  color: #526672;
  font-weight: 650;
}

.trip-leg-popup-entry + .trip-leg-popup-entry {
  border-top: 1px solid #cfdbdf;
  padding-top: 8px;
  margin-top: 8px;
}

.trip-leg-popup dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 2px 8px;
  margin: 5px 0;
}

.trip-leg-popup dt {
  color: #526672;
}

.trip-leg-popup dd {
  margin: 0;
  font-weight: 650;
}

.trip-leg-popup-content p {
  margin: 6px 0;
}
