body.mv-a1-map .mv-pilot-profile,
body.mv-a1-map .mv-pilot-status {
  margin: 12px 0 14px;
  padding: 10px 11px;
  border: 1px solid #c7d1ce;
  border-radius: 9px;
  background: #edf2ef;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85);
}

body.mv-a1-map .mv-pilot-profile {
  margin-bottom: 8px;
  background: #f7f9f8;
}

body.mv-a1-map .mv-pilot-status { margin-top: 8px; }

body.mv-a1-map .mv-pilot-section-head,
body.mv-a1-map .mv-pilot-status-head {
  display: flex;
  min-height: 32px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

body.mv-a1-map .mv-pilot-profile h4,
body.mv-a1-map .mv-pilot-status h4 {
  margin: 0;
  color: #263538;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

body.mv-a1-map .mv-pilot-help,
body.mv-a1-map .mv-pilot-action-help {
  position: relative;
  display: grid;
  box-sizing: border-box;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  place-items: center;
  padding: 0;
  border: 0;
  background-color: transparent;
  background-image: var(--mv-a1-info-icon);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 24px 24px;
  box-shadow: none;
  color: transparent;
  font-size: 0;
  cursor: pointer;
}

body.mv-a1-map .mv-pilot-help::before,
body.mv-a1-map .mv-pilot-action-help::before {
  display: none;
  content: none;
}

body.mv-a1-map .mv-pilot-help,
body.mv-a1-map .mv-pilot-action-help { z-index: 1; }
body.mv-a1-map .mv-pilot-help::after,
body.mv-a1-map .mv-pilot-action-help::after {
  display: none;
  content: none;
}

body.mv-a1-map .mv-pilot-help:focus-visible,
body.mv-a1-map .mv-pilot-action-help:focus-visible,
body.mv-a1-map .mv-pilot-trajectory-button:focus-visible,
body.mv-a1-map .mv-pilot-trajectory-bar button:focus-visible {
  outline: 3px solid #0b6570;
  outline-offset: 2px;
}

body.mv-a1-map .mv-pilot-help-text,
body.mv-a1-map .mv-pilot-action-note {
  margin: 4px 0 9px;
  padding: 8px 9px;
  border: 1px solid #b9c7c3;
  border-radius: 7px;
  background: #fff;
  color: #4d5b5d;
  font-size: 12px;
  line-height: 1.4;
  box-shadow: 0 7px 18px rgba(32,40,43,.12);
}

body.mv-a1-map .mv-pilot-help-text[hidden],
body.mv-a1-map .mv-pilot-action-note[hidden] { display: none !important; }

body.mv-a1-map .mv-pilot-profile-list,
body.mv-a1-map .mv-pilot-status-list {
  display: grid;
  grid-template-columns: minmax(86px,auto) minmax(0,1fr);
  gap: 5px 12px;
  margin: 3px 0 8px;
  font-size: 12px;
  line-height: 1.35;
}

body.mv-a1-map .mv-pilot-profile-list dt,
body.mv-a1-map .mv-pilot-status-list dt { font-weight: 800; }
body.mv-a1-map .mv-pilot-profile-list dd,
body.mv-a1-map .mv-pilot-status-list dd { margin: 0; text-align: right; }
body.mv-a1-map .mv-pilot-status.is-stale .mv-pilot-status-list dd:last-of-type { color: #8b4e3e; font-weight: 700; }
body.mv-a1-map .mv-pilot-source { display: inline-block; color: #0b6570; font-size: 12px; font-weight: 750; text-underline-offset: 3px; }
body.mv-a1-map .mv-pilot-status.is-offline .mv-pilot-source::after { content: " · cache"; color: #6a7778; text-decoration: none; }

body.mv-a1-map .mv-route-popup-actions .mv-pilot-action-wrap {
  position: relative;
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0,1fr) 44px;
  align-items: center;
  gap: 6px;
}

body.mv-a1-map .mv-route-popup-actions .mv-pilot-action-note { grid-column: 1 / -1; margin: 0; }

body.mv-a1-map .leaflet-container a.leaflet-popup-close-button {
  top: 7px !important;
  right: 7px !important;
}

body.mv-a1-map .mv-route-popup-actions a,
body.mv-a1-map .mv-route-popup-actions button:not(.mv-pilot-action-help):not(.mv-pilot-trajectory-button),
body.mv-a1-map .mv-route-popup-add,
body.mv-a1-map .leaflet-popup-close-button {
  border-bottom-width: 2px !important;
  background: linear-gradient(180deg,#fff 0%,#edf3f1 100%) !important;
  box-shadow: 0 2px 0 #a7b2af, 0 5px 12px rgba(23,33,38,.14) !important;
  transition: transform 100ms ease, box-shadow 100ms ease !important;
}

body.mv-a1-map .mv-route-popup-actions .mv-pilot-trajectory-button {
  display: flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 9px 12px;
  border: 1px solid #0b6570 !important;
  border-bottom: 2px solid #0b5f66 !important;
  border-radius: 8px;
  background: linear-gradient(180deg,#2f8d93 0%,#18747b 100%) !important;
  color: #fff !important;
  box-shadow: 0 2px 0 #0b5f66, 0 5px 12px rgba(23,33,38,.17) !important;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

body.mv-a1-map .mv-route-popup-actions .mv-pilot-trajectory-button:active {
  transform: translateY(2px) !important;
  box-shadow: 0 1px 0 #0b5f66, 0 2px 5px rgba(23,33,38,.14) !important;
}

body.mv-a1-map .mv-route-popup-actions .mv-pilot-trajectory-button:disabled {
  cursor: wait;
  opacity: .72;
}

body.mv-a1-map .mv-route-popup-actions a:active,
body.mv-a1-map .mv-route-popup-actions button:not(.mv-pilot-action-help):not(.mv-pilot-trajectory-button):active,
body.mv-a1-map .mv-route-popup-add:active,
body.mv-a1-map .leaflet-popup-close-button:active {
  transform: translateY(2px) !important;
  box-shadow: 0 1px 0 #75817d, 0 2px 5px rgba(23,33,38,.13) !important;
}

body.mv-a1-map .mv-pilot-trajectory-casing { stroke: #fff; stroke-opacity: .9; }
body.mv-a1-map .mv-pilot-trajectory-main { filter: drop-shadow(0 1px 2px rgba(23,33,38,.35)); }

body.mv-a1-map .leaflet-marker-icon.mv-pilot-marker-selected {
  z-index: 900 !important;
  filter: drop-shadow(0 5px 7px rgba(23,33,38,.34));
}

body.mv-a1-map .leaflet-marker-icon.mv-pilot-marker-revealing::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  box-sizing: border-box;
  width: 58px;
  height: 58px;
  transform: translate(-50%,-50%) scale(.55);
  border: 3px solid rgba(255,255,255,.96);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(11,101,112,.6);
  opacity: 0;
  pointer-events: none;
  animation: mv-pilot-marker-focus 760ms cubic-bezier(.2,.75,.25,1) 1;
}

@keyframes mv-pilot-marker-focus {
  0% { opacity: 0; transform: translate(-50%,-50%) scale(.55); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%,-50%) scale(1.18); }
}

body.mv-a1-map .mv-pilot-trajectory-bar {
  position: absolute;
  z-index: 1002;
  right: 14px;
  bottom: 14px;
  left: 50%;
  display: flex;
  width: min(430px,calc(100% - 88px));
  min-height: 54px;
  align-items: center;
  gap: 10px;
  padding: 6px 7px 6px 13px;
  transform: translateX(-50%);
  border: 1px solid #a7b5b2;
  border-radius: 11px;
  background: rgba(255,255,255,.97);
  box-shadow: 0 10px 28px rgba(23,33,38,.22);
  backdrop-filter: blur(7px);
}

body.mv-a1-map .mv-pilot-trajectory-bar[hidden] { display: none !important; }
body.mv-a1-map .mv-pilot-trajectory-copy { min-width: 0; flex: 1; }
body.mv-a1-map .mv-pilot-trajectory-copy small { display: block; color: #0b6570; font-size: 10px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
body.mv-a1-map .mv-pilot-trajectory-copy strong { display: block; overflow: hidden; color: #233236; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
body.mv-a1-map .mv-pilot-trajectory-bar button { display: grid; width: 44px; height: 44px; flex: 0 0 44px; place-items: center; border: 1px solid #879793; border-bottom-width: 2px; border-radius: 9px; background: linear-gradient(180deg,#fff,#edf3f1); color: #233236; box-shadow: 0 2px 0 #a7b2af,0 5px 12px rgba(23,33,38,.14); font: 750 23px/1 system-ui; cursor: pointer; }

@media (min-width: 601px) and (min-height: 521px) {
  body.mv-a1-map .leaflet-popup-content { max-height:min(520px,calc(100svh - 340px))!important; }
}

@media (max-width: 600px) {
  body.mv-a1-map .leaflet-popup-content { max-height:min(500px,62svh)!important; }
  body.mv-a1-map .mv-pilot-profile-list,
  body.mv-a1-map .mv-pilot-status-list { grid-template-columns: 86px minmax(0,1fr); gap: 5px 8px; }
  body.mv-a1-map .mv-pilot-profile-list dd,
  body.mv-a1-map .mv-pilot-status-list dd { text-align: left; }
  body.mv-a1-map .mv-pilot-trajectory-bar {
    position: fixed;
    right: auto;
    bottom: max(12px,env(safe-area-inset-bottom));
    width: calc(100% - 62px);
  }
  body.mv-a1-map .mv-pilot-has-trajectory .leaflet-top.leaflet-left {
    bottom: calc(max(12px,env(safe-area-inset-bottom)) + 66px) !important;
  }
}

@media (max-height: 520px) {
  body.mv-a1-map .leaflet-popup-content { max-height:calc(100svh - 130px)!important; }
  body.mv-a1-map .mv-pilot-trajectory-bar {
    position: fixed;
    right: auto;
    bottom: max(8px,env(safe-area-inset-bottom));
    width: min(430px,calc(100% - 112px));
  }
}

@media (prefers-reduced-motion: reduce) {
  body.mv-a1-map .mv-route-popup-actions a,
  body.mv-a1-map .mv-route-popup-actions button:not(.mv-pilot-action-help):not(.mv-pilot-trajectory-button),
  body.mv-a1-map .mv-route-popup-add,
  body.mv-a1-map .leaflet-popup-close-button { transition: none !important; }
  body.mv-a1-map .leaflet-marker-icon.mv-pilot-marker-revealing::after { animation: none !important; }
}
