#tripReplayMapV2.maplibregl-map,
#tripReplayMapV2 .maplibregl-map {
  width: 100%;
  height: 100%;
  font-family: inherit;
}

#tripReplayMapV2 .maplibregl-canvas {
  display: block;
}

#tripReplayMapV2 .maplibregl-ctrl-attrib {
  font-size: 10px;
}

/* Scale bar: dimmed and borderless so it reads as part of the map rather than
   as chrome sitting on top of it. */
#tripReplayMapV2 .maplibregl-ctrl-scale {
  background: rgba(15, 23, 42, 0.55);
  border-color: rgba(226, 232, 240, 0.65);
  color: #e2e8f0;
  font-size: 10px;
  font-weight: 500;
  border-radius: 0.25rem;
  padding: 0.125rem 0.375rem;
}

/* Scrubber. The native control ships a default browser thumb and an unfilled track, so both are
   restyled here. WebKit and Firefox need separate selectors for the track and the thumb. */
.trv2-scrubber {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 1.5rem;
  background: transparent;
  cursor: pointer;
  margin: 0;
}

.trv2-scrubber::-webkit-slider-runnable-track {
  height: 0.375rem;
  border-radius: 9999px;
  background: var(--v2-line-strong);
}

.trv2-scrubber::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  height: 1.125rem;
  width: 1.125rem;
  margin-top: -0.375rem;
  border-radius: 9999px;
  background: var(--v2-action);
  border: 2px solid var(--v2-surface);
  box-shadow: var(--v2-shadow-2);
}

/* No `:hover`/`:active { transform: scale() }` on the thumb: a control whose size changes under the
   pointer shifts its own hit area, and a scrubber is dragged. Press and hover are tone changes only. */

.trv2-scrubber:focus-visible::-webkit-slider-thumb {
  outline: 2px solid var(--v2-focus);
  outline-offset: 2px;
}

.trv2-scrubber::-moz-range-track {
  height: 0.375rem;
  border-radius: 9999px;
  background: var(--v2-line-strong);
}

.trv2-scrubber::-moz-range-progress {
  height: 0.375rem;
  border-radius: 9999px;
  background: var(--v2-action);
}

.trv2-scrubber::-moz-range-thumb {
  height: 1.125rem;
  width: 1.125rem;
  border-radius: 9999px;
  background: var(--v2-action);
  border: 2px solid var(--v2-surface);
  box-shadow: var(--v2-shadow-2);
}

.trv2-scrubber:focus-visible::-moz-range-thumb {
  outline: 2px solid var(--v2-focus);
  outline-offset: 2px;
}

#tripReplayMapV2 .trv2-map-error {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.75rem;
  min-height: 12rem;
  padding: 1.5rem;
  text-align: center;
  color: var(--v2-danger);
  background: var(--v2-danger-soft);
}

#tripReplayMapV2 .trv2-map-retry {
  padding: 0.5rem 0.875rem;
  border: 1px solid var(--v2-danger-solid);
  border-radius: var(--radius-control);
  color: var(--v2-action-on);
  background: var(--v2-danger-solid);
  cursor: pointer;
}

#tripReplayMapV2 .trv2-map-retry:hover,
#tripReplayMapV2 .trv2-map-retry:focus-visible {
  background: var(--v2-danger);
}
