/**
 * Estilos para a timeline de rastreamento elegante
 */
.rastreamento-timeline {
  position: relative;
  margin: 30px 0;
}

.rastreamento-timeline-header {
  display: flex;
  align-items: center;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e5e5e5;
}

.rastreamento-timeline-title {
  color: #003399;
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  flex: 1;
}

.rastreamento-timeline-refresh {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #666;
}

.rastreamento-timeline-auto {
  display: flex;
  align-items: center;
  margin-left: 15px;
}

.rastreamento-timeline-auto input {
  margin-right: 5px;
}

.rastreamento-timeline-auto label {
  font-size: 14px;
  color: #666;
  cursor: pointer;
}

.rastreamento-timeline-container {
  position: relative;
  padding-left: 30px;
}

.rastreamento-timeline-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 10px;
  width: 3px;
  background: linear-gradient(to bottom, #003399 0%, #e5e5e5 100%);
  border-radius: 3px;
}

.rastreamento-event {
  position: relative;
  margin-bottom: 30px;
  padding-bottom: 20px;
  transform-origin: left center;
  opacity: 0;
  animation: eventFadeIn 0.5s ease forwards;
}

@keyframes eventFadeIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.rastreamento-event:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
}

.rastreamento-event-dot {
  position: absolute;
  left: -30px;
  top: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: #fff;
  border: 3px solid #003399;
  box-shadow: 0 0 0 3px rgba(0, 51, 153, 0.1);
  z-index: 2;
  transition: all 0.3s ease;
}

.rastreamento-event:first-child .rastreamento-event-dot {
  background-color: #ffcc00;
}

.rastreamento-event:hover .rastreamento-event-dot {
  transform: scale(1.2);
  box-shadow: 0 0 0 5px rgba(0, 51, 153, 0.15);
}

.rastreamento-event-content {
  background-color: #fff;
  border-radius: 8px;
  padding: 15px 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  border: 1px solid #eaeaea;
  transition: all 0.3s ease;
}

.rastreamento-event:hover .rastreamento-event-content {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.rastreamento-event-status {
  font-weight: 700;
  font-size: 16px;
  color: #003399;
  margin: 0 0 5px 0;
}

.rastreamento-event-location {
  display: flex;
  align-items: center;
  margin: 0 0 8px 0;
  color: #444;
  font-size: 14px;
}

.rastreamento-event-location-icon {
  margin-right: 5px;
  color: #003399;
}

.rastreamento-event-datetime {
  display: flex;
  align-items: center;
  color: #777;
  font-size: 13px;
  margin: 0 0 10px 0;
}

.rastreamento-event-time-icon {
  margin-right: 5px;
  color: #777;
}

.rastreamento-event-details {
  margin: 10px 0 0 0;
  padding-top: 10px;
  border-top: 1px dashed #eaeaea;
  font-size: 14px;
  color: #555;
  line-height: 1.5;
}

/* Status específicos */
.rastreamento-event.status-postado .rastreamento-event-dot {
  border-color: #0693e3;
}

.rastreamento-event.status-em-transito .rastreamento-event-dot {
  border-color: #ff9900;
}

.rastreamento-event.status-entregue .rastreamento-event-dot {
  border-color: #4caf50;
}

.rastreamento-event.status-saiu-para-entrega .rastreamento-event-dot {
  border-color: #9c27b0;
}

/* Animação de atualização */
.rastreamento-refresh-icon {
  display: inline-block;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.rastreamento-refresh-icon:hover {
  transform: rotate(30deg);
}

.rastreamento-refresh-icon.refreshing {
  animation: refreshRotate 1s linear infinite;
}

@keyframes refreshRotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Animação de novo evento */
.rastreamento-event.new-event {
  animation: newEventPulse 2s ease;
}

@keyframes newEventPulse {
  0% {
    background-color: rgba(255, 204, 0, 0.1);
  }
  50% {
    background-color: rgba(255, 204, 0, 0.2);
  }
  100% {
    background-color: transparent;
  }
}

/* Indicador de atualização ao vivo */
.rastreamento-live-indicator {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  color: #4caf50;
  margin-left: 10px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.rastreamento-live-indicator.active {
  opacity: 1;
}

.rastreamento-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #4caf50;
  margin-right: 5px;
  animation: livePulse 1.5s ease infinite;
}

@keyframes livePulse {
  0% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
  }
  100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
}

/* Responsividade */
@media screen and (max-width: 480px) {
  .rastreamento-timeline-container {
    padding-left: 25px;
  }

  .rastreamento-timeline-line {
    left: 8px;
  }

  .rastreamento-event-dot {
    width: 16px;
    height: 16px;
    left: -25px;
  }

  .rastreamento-event-content {
    padding: 12px 15px;
  }

  .rastreamento-timeline-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .rastreamento-timeline-refresh {
    margin-top: 10px;
  }

  .rastreamento-timeline-auto {
    margin-left: 0;
    margin-top: 10px;
  }
}
