/* Estilos para o loader de caminhão Ex-Envios - Otimizado para nitidez e aceleração GPU */

.loader {
  width: fit-content;
  height: fit-content;
  display: flex;
  align-items: center;
  justify-content: center;
}

.truckWrapper {
  width: 200px;
  height: 100px;
  display: flex;
  flex-direction: column;
  position: relative;
  align-items: center;
  justify-content: flex-end;
  overflow-x: hidden;
}

/* Corpo superior do caminhão - Otimizado para não borrar pixels na animação */
.truckBody {
  width: 130px;
  height: fit-content;
  margin-bottom: 6px;
  animation: motion 1s linear infinite;
  
  /* Força aceleração de hardware 3D no elemento */
  transform: translate3d(0, 0, 0);
  will-change: transform;
  
  /* Evita re-rasterização e blur durante translações */
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform-style: preserve-3d;
}

/* Animação de suspensão do caminhão usando translate3d (GPU-accelerated) para nitidez */
@keyframes motion {
  0% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, 3px, 0);
  }
  100% {
    transform: translate3d(0, 0, 0);
  }
}

/* Pneus do caminhão */
.truckTires {
  width: 130px;
  height: fit-content;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0px 10px 0px 15px;
  position: absolute;
  bottom: 0;
}

.truckTires svg {
  width: 24px;
}

/* Estrada */
.road {
  width: 100%;
  height: 1.5px;
  background-color: #282828;
  position: relative;
  bottom: 0;
  align-self: flex-end;
  border-radius: 3px;
}

.road::before {
  content: "";
  position: absolute;
  width: 20px;
  height: 100%;
  background-color: #282828;
  right: -50%;
  border-radius: 3px;
  animation: roadAnimation 1.4s linear infinite;
  border-left: 10px solid white;
}

.road::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 100%;
  background-color: #282828;
  right: -65%;
  border-radius: 3px;
  animation: roadAnimation 1.4s linear infinite;
  border-left: 4px solid white;
}

.lampPost {
  position: absolute;
  bottom: 0;
  right: -90%;
  height: 90px;
  animation: roadAnimation 1.4s linear infinite;
}

/* Animação da estrada usando translate3d (GPU-accelerated) */
@keyframes roadAnimation {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-350px, 0, 0);
  }
}

.trucksvg path:first-of-type {
  fill: #f58424; /* Cor laranja principal */
}

/* Otimização específica para a imagem da logo contida no SVG para não embaçar */
.trucksvg image {
  /* Suavização de renderização no Chrome/Safari/Firefox */
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  
  /* Previne o flicker e blur causado pela aceleração de hardware do pai */
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translate3d(0, 0, 0);
}
