/* Compact MyMappi route card and branded blue-green paths. */
html body .app-shell .map-stage.map-focus .directions-panel,
html body main.app-shell section.map-stage.map-focus .directions-panel {
  position: absolute !important;
  top: 92px !important;
  right: auto !important;
  bottom: auto !important;
  left: 24px !important;
  z-index: 700 !important;
  box-sizing: border-box !important;
  width: min(336px, calc(100vw - 48px)) !important;
  max-width: 336px !important;
  max-height: min(68vh, 560px) !important;
  gap: 10px !important;
  padding: 14px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  border: 0 !important;
  border-radius: 22px !important;
  color: #f5fffc !important;
  background:
    radial-gradient(circle at 12% 0%, rgba(91, 226, 191, 0.17), transparent 44%),
    linear-gradient(145deg, rgba(4, 38, 52, 0.96), rgba(5, 68, 76, 0.93)) !important;
  box-shadow:
    0 20px 48px rgba(0, 18, 30, 0.3),
    inset 0 0 0 1px rgba(221, 255, 247, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.13) !important;
  backdrop-filter: blur(18px) saturate(1.12) !important;
  -webkit-backdrop-filter: blur(18px) saturate(1.12) !important;
}

html body .app-shell .directions-panel[hidden] {
  display: none !important;
}

html body .app-shell .map-stage.map-focus .directions-panel.open {
  display: grid !important;
  animation: mymappiRouteCardIn 240ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

html body .app-shell .directions-panel.has-target .directions-heading {
  order: 1;
}

html body .app-shell .directions-panel.has-target .directions-mode {
  order: 2;
}

html body .app-shell .directions-panel.has-target .directions-summary {
  order: 3;
}

html body .app-shell .directions-panel.has-target .directions-actions {
  order: 4;
}

html body .app-shell .directions-panel.has-target .directions-box,
html body .app-shell .directions-panel.has-target .directions-results {
  display: none !important;
}

html body .app-shell .directions-heading {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 34px !important;
  align-items: center !important;
  gap: 12px !important;
}

html body .app-shell .directions-heading > div {
  min-width: 0 !important;
}

html body .app-shell .directions-heading span {
  display: block !important;
  margin-bottom: 2px !important;
  color: #8cebc8 !important;
  font-size: 0.64rem !important;
  font-weight: 820 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
}

html body .app-shell .directions-heading strong {
  display: block !important;
  overflow: hidden !important;
  color: #ffffff !important;
  font-size: 1rem !important;
  font-weight: 820 !important;
  letter-spacing: 0 !important;
  line-height: 1.2 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

html body .app-shell .directions-close {
  display: grid !important;
  width: 34px !important;
  height: 34px !important;
  place-items: center !important;
  padding: 0 !important;
  border: 1px solid rgba(226, 255, 248, 0.18) !important;
  border-radius: 12px !important;
  color: #f5fffc !important;
  font-size: 1.15rem !important;
  line-height: 1 !important;
  background: rgba(255, 255, 255, 0.075) !important;
  box-shadow: none !important;
}

html body .app-shell .directions-mode {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 5px !important;
  min-width: 0 !important;
  padding: 4px !important;
  border: 1px solid rgba(222, 255, 247, 0.14) !important;
  border-radius: 15px !important;
  background: rgba(255, 255, 255, 0.055) !important;
}

html body .app-shell .directions-mode-button {
  display: flex !important;
  min-width: 0 !important;
  min-height: 39px !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  padding: 0 12px !important;
  border: 0 !important;
  border-radius: 11px !important;
  color: rgba(239, 255, 251, 0.72) !important;
  font-size: 0.82rem !important;
  font-weight: 780 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html body .app-shell .directions-mode-button [data-lucide],
html body .app-shell .directions-mode-button svg {
  width: 17px !important;
  height: 17px !important;
  stroke-width: 2.15 !important;
}

html body .app-shell .directions-mode-button.active {
  color: #063d48 !important;
  background: linear-gradient(135deg, #a9f2d0, #77e5ef) !important;
  box-shadow:
    0 7px 17px rgba(24, 192, 155, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.62) !important;
}

html body .app-shell .directions-box {
  min-height: 44px !important;
  padding-inline: 12px !important;
  border: 1px solid rgba(222, 255, 247, 0.14) !important;
  border-radius: 14px !important;
  background: rgba(255, 255, 255, 0.065) !important;
}

html body .app-shell .directions-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 7px !important;
}

html body .app-shell .directions-action {
  display: flex !important;
  min-width: 0 !important;
  min-height: 38px !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  padding: 0 9px !important;
  border: 1px solid rgba(222, 255, 247, 0.16) !important;
  border-radius: 12px !important;
  color: #063d48 !important;
  font-size: 0.72rem !important;
  font-weight: 780 !important;
  background: linear-gradient(135deg, #a9f2d0, #77e5ef) !important;
  box-shadow: none !important;
}

html body .app-shell .directions-action.subtle {
  color: rgba(241, 255, 252, 0.84) !important;
  background: rgba(255, 255, 255, 0.065) !important;
}

html body .app-shell .directions-action [data-lucide],
html body .app-shell .directions-action svg {
  width: 15px !important;
  height: 15px !important;
  flex: 0 0 auto !important;
}

html body .app-shell .directions-action:disabled {
  opacity: 0.42 !important;
}

html body .app-shell .directions-summary {
  display: grid !important;
  min-height: 54px !important;
  gap: 8px !important;
  padding: 11px 12px !important;
  border: 1px solid rgba(222, 255, 247, 0.14) !important;
  border-radius: 16px !important;
  color: rgba(238, 255, 251, 0.78) !important;
  background: rgba(255, 255, 255, 0.055) !important;
}

html body .app-shell .directions-summary.is-loading {
  background:
    linear-gradient(90deg, transparent, rgba(122, 232, 215, 0.09), transparent),
    rgba(255, 255, 255, 0.055) !important;
  background-size: 220% 100% !important;
  animation: mymappiRouteLoading 1.8s ease-in-out infinite !important;
}

html body .app-shell .directions-summary.is-ready {
  border-color: rgba(133, 238, 207, 0.23) !important;
  background:
    radial-gradient(circle at 0% 0%, rgba(87, 225, 186, 0.12), transparent 44%),
    rgba(255, 255, 255, 0.065) !important;
}

html body .app-shell .directions-summary.is-error {
  border-color: rgba(255, 195, 133, 0.22) !important;
}

html body .app-shell .route-summary-destination {
  min-width: 0 !important;
}

html body .app-shell .route-summary-kicker {
  display: block !important;
  margin-bottom: 2px !important;
  color: #8cebc8 !important;
  font-size: 0.62rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
}

html body .app-shell .route-summary-destination > strong {
  display: block !important;
  overflow: hidden !important;
  color: #ffffff !important;
  font-size: 0.9rem !important;
  line-height: 1.25 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

html body .app-shell .route-summary-metrics {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 7px !important;
}

html body .app-shell .route-summary-metrics > span {
  display: grid !important;
  min-width: 0 !important;
  gap: 2px !important;
  padding: 8px 9px !important;
  border-radius: 11px !important;
  background: rgba(255, 255, 255, 0.07) !important;
}

html body .app-shell .route-summary-metrics small {
  color: rgba(231, 255, 249, 0.58) !important;
  font-size: 0.59rem !important;
  font-weight: 680 !important;
  line-height: 1.15 !important;
}

html body .app-shell .route-summary-metrics strong {
  overflow: hidden !important;
  color: #ffffff !important;
  font-size: 0.86rem !important;
  font-weight: 850 !important;
  line-height: 1.2 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

html body .app-shell .directions-route-main {
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  filter:
    drop-shadow(0 0 5px rgba(77, 222, 214, 0.28))
    drop-shadow(0 3px 6px rgba(1, 30, 42, 0.2)) !important;
}

html body .app-shell .directions-route-glow {
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  filter: blur(0.35px) drop-shadow(0 0 13px rgba(87, 226, 205, 0.3)) !important;
}

html body .app-shell .directions-route-pulse {
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  animation: mymappiPremiumRouteFlow 2.5s linear infinite !important;
}

html body .app-shell .route-marker {
  min-width: 52px !important;
  height: 27px !important;
  border: 0 !important;
  border-radius: 999px !important;
  font-size: 0.66rem !important;
  font-weight: 820 !important;
  box-shadow:
    0 8px 18px rgba(3, 35, 47, 0.2),
    inset 0 0 0 1px rgba(239, 255, 251, 0.55) !important;
}

@keyframes mymappiRouteCardIn {
  from { opacity: 0; transform: translateY(8px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes mymappiRouteLoading {
  0%, 100% { background-position: 120% 0; }
  50% { background-position: -120% 0; }
}

@keyframes mymappiPremiumRouteFlow {
  to { stroke-dashoffset: -42; }
}

@media (max-width: 720px) {
  html body .app-shell .map-stage.map-focus .directions-panel,
  html body main.app-shell section.map-stage.map-focus .directions-panel {
    position: fixed !important;
    top: calc(env(safe-area-inset-top) + 62px) !important;
    right: 12px !important;
    bottom: auto !important;
    left: 12px !important;
    width: auto !important;
    max-width: none !important;
    max-height: min(58dvh, 470px) !important;
    padding: 13px !important;
    border-radius: 20px !important;
  }

  html body .app-shell .directions-mode-button {
    min-height: 42px !important;
  }

  html body .app-shell .directions-action {
    min-height: 40px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html body .app-shell .map-stage.map-focus .directions-panel.open,
  html body .app-shell .directions-summary.is-loading,
  html body .app-shell .directions-route-pulse {
    animation: none !important;
  }
}
