/* Shared 3D driving truck. The native pointer remains visible at all times. */
.truck-system,
.truck-system * {
  pointer-events: none !important;
  user-select: none !important;
}

.truck-system {
  position: fixed;
  inset: 0;
  z-index: 900;
  width: 0;
  height: 0;
  visibility: hidden;
}

.truck-system.is-ready {
  visibility: visible;
}

.truck-vehicle-host {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 900;
  overflow: visible;
  transform: translate(-50%, -58%);
  transform-origin: 50% 58%;
  contain: layout paint style;
}

.truck-vehicle-host[hidden] {
  display: none;
}

.truck-vehicle-canvas {
  display: block;
  width: 100%;
  height: 100%;
  background: transparent;
}

.truck-progress {
  position: fixed;
  z-index: 899;
  top: max(94px, 14svh);
  right: 0;
  bottom: max(30px, calc(env(safe-area-inset-bottom) + 14px));
  width: 32px;
  color: currentColor;
}

.truck-progress[hidden] {
  display: none;
}

.truck-progress__rail {
  position: absolute;
  inset: 0 auto 0 15px;
  width: 2px;
  background: color-mix(in srgb, currentColor 42%, transparent);
}

.truck-progress__ticks {
  position: absolute;
  inset: 0;
}

.truck-progress__tick {
  position: absolute;
  left: 15px;
  width: 5px;
  height: 5px;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: Canvas;
  transform: translate(-50%, -50%);
}

@media (pointer: coarse) and (prefers-reduced-motion: no-preference) {
  body[data-truck-mode] {
    padding-right: 32px;
  }
}

.truck-motion-control--generated {
  appearance: none;
  padding: 6px 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.truck-motion-control--floating {
  position: fixed;
  z-index: 950;
  right: 16px;
  bottom: 16px;
  padding: 8px 10px;
  border: 1px solid currentColor;
  background: Canvas;
  color: CanvasText;
  font: 600 12px/1.2 sans-serif;
}

@media (prefers-reduced-motion: reduce) {
  .truck-system {
    display: none !important;
  }
}

@media print {
  .truck-system,
  .truck-motion-control--generated,
  [data-truck-motion-toggle],
  #truck-motion-toggle {
    display: none !important;
  }
}
