/* Rastreador GPS ao vivo — admin, loja e frota */

.modal-card.modal-card--live-tracker {
  width: min(1180px, 98vw) !important;
  max-height: 94vh;
  overflow: hidden;
  padding: 0;
  background: #070b12;
  border-radius: 18px;
  border: 1px solid rgba(0, 255, 136, 0.18);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55);
}
.modal-card--live-tracker .modal-header {
  background: #0b1220;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
}
.modal-card--live-tracker .modal-header h3 { color: #f8fafc; font-weight: 800; }
.modal-card--live-tracker .modal-body { padding: 0; max-height: calc(94vh - 56px); overflow: hidden; }
.modal-card--live-tracker .close-x { color: #94a3b8; }

.xdlt {
  position: relative;
  height: min(78vh, 720px);
  min-height: 520px;
  background: #070b12;
  color: #e2e8f0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}
.xdlt-map {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #0f172a;
}
.xdlt-map .leaflet-control-zoom a {
  background: #111827;
  color: #e2e8f0;
  border-color: #1f2937;
}

.xdlt-hud {
  position: absolute;
  z-index: 4;
  pointer-events: none;
}
.xdlt-hud > * { pointer-events: auto; }

.xdlt-top {
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.xdlt-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(0, 255, 136, 0.35);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #00ff88;
  backdrop-filter: blur(10px);
}
.xdlt-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00ff88;
  box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.7);
  animation: xdlt-pulse 1.4s infinite;
}
@keyframes xdlt-pulse {
  0% { box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.55); }
  70% { box-shadow: 0 0 0 10px rgba(0, 255, 136, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 255, 136, 0); }
}
.xdlt-chip {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  font-weight: 700;
  color: #e2e8f0;
  backdrop-filter: blur(10px);
}
.xdlt-chip--muted { color: #94a3b8; font-weight: 600; }

.xdlt-side {
  top: 58px;
  left: 12px;
  width: min(340px, calc(100% - 24px));
  max-height: calc(100% - 78px);
  overflow: auto;
  padding: 16px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(8, 13, 24, 0.94), rgba(8, 13, 24, 0.82));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(14px);
}
.xdlt-side h4 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
}
.xdlt-side .xdlt-status {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  color: #00ff88;
}
.xdlt-meta {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}
.xdlt-meta small {
  display: block;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
  font-weight: 700;
}
.xdlt-meta strong {
  display: block;
  font-size: 13px;
  font-weight: 650;
  color: #e2e8f0;
  line-height: 1.35;
}
.xdlt-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
.xdlt-stat {
  padding: 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.xdlt-stat b { display: block; font-size: 15px; color: #fff; }
.xdlt-timeline { margin-top: 4px; }
.xdlt-timeline .pedido-timeline { margin: 12px 0 0 !important; }

.xdlt-footer-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.xdlt-footer-actions .btn,
.xdlt-footer-actions button {
  flex: 1;
}

.xdlt-moto-icon,
.xdlt-pin-icon {
  background: transparent !important;
  border: none !important;
}

.xdlt-moto-wrap { position: relative; width: 52px; height: 52px; }
.xdlt-moto-wrap--photo { transform: none !important; }
.xdlt-moto-pulse {
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: rgba(14, 165, 233, 0.28);
  animation: xdlt-pulse 1.6s infinite;
}
.xdlt-moto-body {
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: #0ea5e9;
  border: 3px solid #fff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.xdlt-moto-photo {
  position: absolute;
  inset: 4px;
  width: calc(100% - 8px);
  height: calc(100% - 8px);
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
  background: #0f172a;
}
.xdlt-pin {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  border: 2px solid #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}
.xdlt-pin--loja { background: #f59e0b; }
.xdlt-pin--dest { background: #ef4444; }

#aba-rastreamento-entregador.xdlt-loja-modal {
  background: rgba(2, 6, 14, 0.72);
  backdrop-filter: blur(8px);
}
#aba-rastreamento-entregador.xdlt-loja-modal .xdlt-loja-card {
  width: min(1180px, 96vw);
  max-width: none;
  max-height: 94vh;
  margin: auto;
  padding: 0 !important;
  background: #070b12;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(0, 255, 136, 0.16);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
}
.xdlt-loja-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.xdlt-loja-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #0b1220;
  color: #f8fafc;
  font-weight: 800;
}
.xdlt-loja-head button {
  background: #1f2937;
  color: #e2e8f0;
  border: 0;
  border-radius: 10px;
  padding: 8px 14px;
  font-weight: 700;
  cursor: pointer;
}

.entregadores-online-wrap--live {
  background: #070b12;
}
.entregadores-online-livebar {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  display: flex;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}
.entregadores-online-wrap--fullscreen .entregadores-online-cards {
  top: 56px;
}
.entregadores-online-wrap--live .entregadores-card {
  background: rgba(8, 13, 24, 0.88) !important;
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}
.entregadores-online-wrap--live .entregadores-card-label,
.entregadores-online-wrap--live .entregadores-card-desc,
.entregadores-online-wrap--live .entregadores-card strong {
  color: #f8fafc !important;
}
.entregadores-online-wrap--live .entregadores-card-desc { color: #94a3b8 !important; font-size: 11px; }

@media (max-width: 820px) {
  .xdlt { min-height: 88vh; height: 88vh; }
  .xdlt-side {
    top: auto;
    bottom: 12px;
    max-height: 42%;
    width: calc(100% - 24px);
  }
}

.xdlt-steps {
  display: flex;
  justify-content: space-between;
  position: relative;
  padding: 10px 2px 2px;
  margin-top: 6px;
  gap: 4px;
}
.xdlt-steps__line {
  position: absolute;
  top: 16px;
  left: 18px;
  right: 18px;
  height: 3px;
  background: #1e2937;
  border-radius: 99px;
  overflow: hidden;
}
.xdlt-steps__fill {
  height: 100%;
  background: linear-gradient(90deg, #00ff88, #d4af37);
  transition: width 0.4s ease;
}
.xdlt-steps__item {
  z-index: 1;
  text-align: center;
  flex: 1;
}
.xdlt-steps__dot {
  display: block;
  width: 12px;
  height: 12px;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: #334155;
  border: 2px solid #0f172a;
  box-shadow: 0 0 0 1px #334155;
}
.xdlt-steps__item.is-on .xdlt-steps__dot {
  background: #00ff88;
  box-shadow: 0 0 0 1px #00ff88;
}
.xdlt-steps__item.is-now .xdlt-steps__dot {
  box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.28), 0 0 12px #00ff88;
}
.xdlt-steps__label {
  display: block;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}
.xdlt-steps__item.is-on .xdlt-steps__label {
  color: #00ff88;
}
