/* ─────────────────────────────────────────────────────────────
   HOPPER ADS ENTERPRISE GIS TELEMATICS VISUALIZER
   Real-World Esri Dark Gray GIS Map & Dynamic Telemetry
   Zero emojis, zero attribution badges, zero clutter.
───────────────────────────────────────────────────────────── */

/* Hide Leaflet & Third-Party Attributions completely */
.leaflet-control-attribution,
.leaflet-control-attribution a,
.leaflet-bottom.leaflet-right .leaflet-control-attribution {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Base Widget Container */
.h-map-widget {
  background: #090b0e;
  border: 1px solid rgba(212, 120, 26, 0.35);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.85), 0 0 40px rgba(212, 120, 26, 0.12);
  margin: 2rem 0;
  position: relative;
  font-family: 'Barlow', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #fff;
}

/* TOP HUD */
.h-map-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: #0e1217;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
  gap: 1rem;
}

.h-hud-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.h-live-beacon {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
  animation: hBeaconGlow 1.8s infinite;
}

@keyframes hBeaconGlow {
  0% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { transform: scale(1.15); box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.h-hud-title {
  font-family: 'DM Mono', monospace;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
}

.h-hud-pill {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  font-weight: 700;
  color: #22c55e;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  letter-spacing: 0.06em;
}

.h-hud-stats {
  display: flex;
  align-items: center;
  gap: 1.8rem;
}

.h-stat-item {
  display: flex;
  flex-direction: column;
}

.h-stat-lbl {
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem;
  color: #8b929e;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.h-stat-val {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--amber, #d4781a);
  letter-spacing: 0.03em;
}

/* MAP BODY & VIEWPORT */
.h-map-body-wrap {
  position: relative;
  width: 100%;
  height: 540px;
  background: #07090b;
}

.h-leaflet-map {
  width: 100%;
  height: 100%;
  background: #07090b !important;
}

/* Leaflet Zoom Control Styling */
.leaflet-bar {
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6) !important;
  border-radius: 8px !important;
  overflow: hidden;
}

.leaflet-bar a {
  background-color: #0e1217 !important;
  color: #d4781a !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  width: 32px !important;
  height: 32px !important;
  line-height: 32px !important;
}

.leaflet-bar a:hover {
  background-color: #1a2029 !important;
  color: #fff !important;
}

/* FLOATING TELEMETRY CARD */
.h-telemetry-hud {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 1000;
  background: rgba(14, 18, 23, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(212, 120, 26, 0.4);
  border-radius: 12px;
  padding: 1.1rem 1.3rem;
  width: 320px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.75);
  pointer-events: auto;
}

.h-thud-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.h-thud-tag {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  font-weight: 700;
  color: #d4781a;
  background: rgba(212, 120, 26, 0.14);
  border: 1px solid rgba(212, 120, 26, 0.35);
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
}

.h-thud-live {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  font-weight: 600;
  color: #22c55e;
}

.h-mini-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
}

.h-thud-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}

.h-thud-sub {
  font-size: 0.78rem;
  color: #8b929e;
  margin-top: 0.2rem;
  margin-bottom: 0.8rem;
}

.h-thud-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 0.65rem 0.8rem;
}

.h-tg-item {
  display: flex;
  flex-direction: column;
}

.h-tg-l {
  font-family: 'DM Mono', monospace;
  font-size: 0.58rem;
  color: #8b929e;
  letter-spacing: 0.05em;
  margin-bottom: 0.15rem;
}

.h-tg-v {
  font-family: 'DM Mono', monospace;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
}

/* RESET VIEW BUTTON */
.h-map-quick-controls {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 1000;
}

.h-qc-btn {
  background: rgba(14, 18, 23, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #d4781a;
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.45rem 0.9rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.h-qc-btn:hover {
  background: #d4781a;
  color: #000;
  border-color: #d4781a;
}

/* TRUCK MARKERS & CHEVRON ROTATION */
.h-truck-divicon {
  background: transparent;
  border: none;
}

.h-truck-wrapper {
  position: relative;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.h-truck-halo {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(212, 120, 26, 0.2);
  border: 1px solid rgba(212, 120, 26, 0.7);
  animation: hTruckPulse 2s infinite ease-out;
}

@keyframes hTruckPulse {
  0% { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}

.h-truck-chevron {
  position: relative;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
  z-index: 2;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.8));
}

.h-truck-tag {
  position: absolute;
  bottom: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: #000;
  border: 1px solid #d4781a;
  color: #fff;
  font-family: 'DM Mono', monospace;
  font-size: 0.58rem;
  font-weight: 700;
  padding: 0 0.3rem;
  border-radius: 3px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 3;
}

/* AGRICULTURAL HUB MARKERS */
.h-hub-marker {
  background: transparent;
  border: none;
}

.h-hub-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #eab308;
  border: 1px solid #fff;
  margin: 0 auto;
  box-shadow: 0 0 6px rgba(234, 179, 8, 0.8);
}

.h-hub-label {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  color: #e5e7eb;
  background: rgba(10, 12, 16, 0.85);
  border: 1px solid rgba(234, 179, 8, 0.3);
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  text-align: center;
  white-space: nowrap;
  margin-top: 3px;
  letter-spacing: 0.02em;
}

/* TOOLTIP STYLES */
.h-route-tooltip {
  background: #0e1217 !important;
  border: 1px solid rgba(212, 120, 26, 0.4) !important;
  color: #fff !important;
  border-radius: 6px !important;
  font-size: 0.75rem !important;
  padding: 0.4rem 0.65rem !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7) !important;
}

.h-route-tooltip::before {
  border-top-color: #0e1217 !important;
}

/* FOOTER BAR (NO OPEN FLEET MAP LINK, PURE METHODOLOGY) */
.h-map-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1.5rem;
  background: #0a0d11;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
  gap: 0.8rem;
}

.h-foot-method {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  color: #8b929e;
  line-height: 1.4;
  flex: 1 1 300px;
}

.h-foot-dynamic {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  color: #d4781a;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* RESPONSIVE BREAKPOINTS */
@media (max-width: 768px) {
  .h-map-hud {
    padding: 0.8rem 1rem;
  }
  .h-hud-stats {
    gap: 1rem;
  }
  .hide-mobile {
    display: none;
  }
  .h-map-body-wrap {
    height: 420px;
  }
  .h-telemetry-hud {
    top: auto;
    bottom: 12px;
    left: 12px;
    right: 12px;
    width: auto;
    padding: 0.8rem 1rem;
  }
  .h-map-foot {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.8rem 1rem;
  }
}
