/* Autohaul Quote Experience */
.con-anime.ahd-qe-host {
  position: relative;
  min-height: 445px;
  --ahd-qe-accent: #2B5CFF;
  --ahd-qe-navy: #0A1A2F;
  --ahd-qe-white: #ffffff;
  --ahd-qe-muted: rgba(255,255,255,.72);
}

.con-anime .ahd-qe-original,
.con-anime .ahd-qe-visual {
  transition: opacity .32s ease, transform .32s ease, visibility .32s ease;
}

.con-anime .ahd-qe-original {
  position: relative;
  z-index: 1;
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

.con-anime .ahd-qe-visual {
  position: absolute;
  z-index: 2;
  inset: 0;
  opacity: 0;
  transform: translateY(10px);
  visibility: hidden;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--ahd-qe-white);
  font-family: inherit;
}

.con-anime.ahd-qe-active .ahd-qe-original {
  opacity: 0;
  transform: translateY(-8px);
  visibility: hidden;
  pointer-events: none;
}

.con-anime.ahd-qe-active .ahd-qe-visual {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
  pointer-events: auto;
}

.ahd-qe-route-top {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto minmax(0,1fr);
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.ahd-qe-location {
  min-width: 0;
}

.ahd-qe-location:last-child {
  text-align: right;
}

.ahd-qe-location-label {
  display: block;
  margin-bottom: 5px;
  font-size: 10px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: rgba(255,255,255,.6);
}

.ahd-qe-location-value {
  display: block;
  font-size: clamp(14px, 1.45vw, 19px);
  line-height: 1.25;
  font-weight: 750;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ahd-qe-distance {
  min-width: 92px;
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 999px;
  background: rgba(255,255,255,.1);
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
  backdrop-filter: blur(8px);
}

.ahd-qe-distance strong {
  display: block;
  font-size: 15px;
  line-height: 1;
}

.ahd-qe-distance span {
  display: block;
  margin-top: 4px;
  font-size: 9px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.58);
}

.ahd-qe-map-shell {
  position: relative;
  width: 100%;
  flex: 1 1 auto;
  min-height: 245px;
  max-height: 340px;
  overflow: hidden;
}

.ahd-qe-map-status {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  font-size: 12px;
  color: rgba(255,255,255,.62);
  letter-spacing: .04em;
}

#ahd-qe-us-map {
  width: 100%;
  height: 100%;
  min-height: 245px;
  display: block;
  overflow: visible;
}

#ahd-qe-us-map .ahd-qe-state {
  fill: rgba(255,255,255,.16);
  stroke: rgba(255,255,255,.46);
  stroke-width: .75;
  transition: fill .25s ease, stroke .25s ease, filter .25s ease;
}

#ahd-qe-us-map .ahd-qe-state.is-origin,
#ahd-qe-us-map .ahd-qe-state.is-destination {
  fill: rgba(255,255,255,.9);
  stroke: #fff;
  stroke-width: 1.25;
  filter: drop-shadow(0 5px 12px rgba(0,0,0,.22));
}

#ahd-qe-us-map .ahd-qe-route-line {
  fill: none;
  stroke: var(--ahd-qe-accent);
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-dasharray: 8 8;
  animation: ahdQeDash 1.1s linear infinite;
  filter: drop-shadow(0 2px 5px rgba(43,92,255,.35));
}

#ahd-qe-us-map .ahd-qe-route-halo {
  fill: none;
  stroke: rgba(255,255,255,.16);
  stroke-width: 9;
  stroke-linecap: round;
}

#ahd-qe-us-map .ahd-qe-pin-ring {
  fill: rgba(255,255,255,.14);
  stroke: #fff;
  stroke-width: 1;
  transform-box: fill-box;
  transform-origin: center;
  animation: ahdQePulse 2s ease-out infinite;
}

#ahd-qe-us-map .ahd-qe-pin {
  fill: var(--ahd-qe-accent);
  stroke: #fff;
  stroke-width: 2;
}

.ahd-qe-transport-stage {
  position: relative;
  display: none;
  height: 118px;
  margin-top: 4px;
}

.ahd-qe-visual.has-vehicle .ahd-qe-transport-stage {
  display: block;
}

.ahd-qe-road-line {
  position: absolute;
  left: 58px;
  right: 58px;
  bottom: 36px;
  border-top: 2px dashed rgba(255,255,255,.36);
}

.ahd-qe-state-pill {
  position: absolute;
  bottom: 23px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 29px;
  padding: 0 9px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 8px;
  background: rgba(255,255,255,.14);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(7px);
}

.ahd-qe-state-pill.is-origin { left: 0; }
.ahd-qe-state-pill.is-destination { right: 0; }

.ahd-qe-truck-runway {
  position: absolute;
  left: 58px;
  right: 58px;
  bottom: 24px;
  height: 86px;
  overflow: hidden;
}

.ahd-qe-truck {
  position: absolute;
  left: -280px;
  bottom: -6px;
  width: 260px;
  height: 92px;
  animation: ahdQeDrive 13s linear infinite;
  will-change: left;
}

.ahd-qe-truck img,
.ahd-qe-truck svg {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  overflow: visible;
}

.ahd-qe-summary {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: max-content;
  max-width: 100%;
  white-space: nowrap;
  text-align: center;
  font-size: 11px;
  color: rgba(255,255,255,.68);
}

.ahd-qe-summary-item {
  display: none;
}

.ahd-qe-summary-item.has-value {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.ahd-qe-summary-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255,255,255,.45);
}

.ahd-qe-route-error {
  display: none;
  margin-top: 4px;
  font-size: 10px;
  color: rgba(255,255,255,.6);
}

.ahd-qe-route-error.is-visible { display: block; }

@keyframes ahdQeDash { to { stroke-dashoffset: -16; } }
@keyframes ahdQePulse {
  0% { transform: scale(.65); opacity: .8; }
  100% { transform: scale(2.3); opacity: 0; }
}
@keyframes ahdQeDrive {
  from { left: -280px; }
  to { left: calc(100% + 20px); }
}

@media (prefers-reduced-motion: reduce) {
  #ahd-qe-us-map .ahd-qe-route-line,
  #ahd-qe-us-map .ahd-qe-pin-ring,
  .ahd-qe-truck {
    animation: none !important;
  }
  .ahd-qe-truck { left: calc(50% - 88px); }
}

@media (max-width: 768px) {
  .con-anime.ahd-qe-host { min-height: 360px; }
  .ahd-qe-route-top { gap: 7px; }
  .ahd-qe-location-value { font-size: 13px; }
  .ahd-qe-distance { min-width: 76px; padding: 7px 9px; }
  .ahd-qe-distance strong { font-size: 13px; }
  .ahd-qe-map-shell { min-height: 205px; max-height: 260px; }
  #ahd-qe-us-map { min-height: 205px; }
  .ahd-qe-transport-stage { height: 80px; }
  .ahd-qe-truck { width: 180px; height: 60px; left: -190px; }
  @keyframes ahdQeDrive {
    from { left: -160px; }
    to { left: calc(100% + 12px); }
  }
}

@media (max-width: 520px) {
  .ahd-qe-route-top {
    grid-template-columns: 1fr 1fr;
  }
  .ahd-qe-distance {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: center;
    min-width: 104px;
  }
  .ahd-qe-location:last-child { grid-column: 2; grid-row: 1; }
  .ahd-qe-summary { font-size: 10px; }
}
