/* NPN ADS-B Plane Overlay v2 */

#npn-adsb-overlay-panel {
  position: fixed;
  left: 10px;
  top: 112px;
  z-index: 2147481050;
  width: 158px;
  max-width: calc(100vw - 20px);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 14px;
  background: rgba(6,14,24,.82);
  color: rgba(255,255,255,.92);
  box-shadow: 0 10px 24px rgba(0,0,0,.28);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow: hidden;
}

#npn-adsb-overlay-panel .npn-adsb-head {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  align-items: center;
  padding: 5px 6px 5px;
  border-bottom: 1px solid rgba(255,255,255,.10);
}

#npn-adsb-overlay-panel .npn-adsb-minimize {
  height: 18px;
  min-height: 18px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.72);
  padding: 0 6px;
  font-size: 7px;
  font-weight: 850;
  cursor: pointer;
  letter-spacing: .06em;
}

#npn-adsb-overlay-panel .npn-adsb-minimize:hover {
  background: rgba(255,255,255,.16);
  color: rgba(255,255,255,.92);
}

#npn-adsb-overlay-panel .npn-adsb-title {
  font-size: 9px;
  font-weight: 950;
  letter-spacing: .10em;
  text-transform: uppercase;
}

#npn-adsb-overlay-panel .npn-adsb-body {
  padding: 7px 8px 8px;
  display: grid;
  gap: 5px;
}

#npn-adsb-overlay-panel .npn-adsb-row {
  min-width: 0;
  display: flex;
  justify-content: space-between;
  gap: 6px;
  font-size: 9px;
  color: rgba(255,255,255,.62);
}

#npn-adsb-overlay-panel .npn-adsb-row span,
#npn-adsb-overlay-panel .npn-adsb-row strong {
  min-width: 0;
}

#npn-adsb-overlay-panel .npn-adsb-row strong {
  color: rgba(255,255,255,.90);
  font-weight: 900;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#npn-adsb-overlay-panel .npn-adsb-source-row {
  display: none;
}

#npn-adsb-overlay-panel button {
  height: 23px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.90);
  padding: 0 7px;
  font-size: 8px;
  font-weight: 900;
  cursor: pointer;
}

#npn-adsb-overlay-panel button:hover {
  background: rgba(255,255,255,.14);
}

#npn-adsb-overlay-panel .npn-adsb-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}

#npn-adsb-overlay-panel .npn-adsb-actions #npn-adsb-fit {
  grid-column: 1 / -1;
}

/* Hide minimize button when panel is minimized (in dock) */
#npn-adsb-overlay-panel.npn-panel-is-minimized .npn-adsb-minimize,
#npn-adsb-overlay-panel[data-npn-panel-dock-minimized] .npn-adsb-minimize {
  display: none !important;
}

/* Panel header when minimized - match dock chip styling */
#npn-adsb-overlay-panel.npn-panel-is-minimized {
  border-radius: 8px !important;
}

#npn-adsb-overlay-panel.npn-panel-is-minimized .npn-adsb-head {
  padding: 3px 5px !important;
  border-bottom: none !important;
}

#npn-adsb-overlay-panel.npn-panel-is-minimized .npn-adsb-title {
  font-size: 8px !important;
}

#npn-adsb-overlay-panel.npn-panel-is-minimized .npn-adsb-collapse {
  height: 15px !important;
  min-height: 15px !important;
  width: 15px !important;
  min-width: 15px !important;
  font-size: 9px !important;
  padding: 0 !important;
}

/* ADS-B chip in the dock - match dock dimensions */
#npn-panel-dock .npn-panel-dock-chip[data-restore-panel*="npn-adsb"],
.npn-panel-dock .npn-panel-dock-chip[data-restore-panel*="npn-adsb"] {
  width: 132px !important;
  min-width: 132px !important;
  max-width: 132px !important;
  height: 21px !important;
  min-height: 21px !important;
  max-height: 21px !important;
  padding: 0 5px !important;
  gap: 3px !important;
  border-radius: 8px !important;
  box-sizing: border-box !important;
}

#npn-panel-dock .npn-panel-dock-chip[data-restore-panel*="npn-adsb"] .npn-panel-dock-icon,
.npn-panel-dock .npn-panel-dock-chip[data-restore-panel*="npn-adsb"] .npn-panel-dock-icon {
  font-size: 9px !important;
}

#npn-adsb-overlay-panel.npn-adsb-collapsed {
  width: auto;
}

#npn-adsb-overlay-panel.npn-adsb-collapsed .npn-adsb-body {
  display: none;
}

.npn-adsb-plane-icon {
  width: 26px !important;
  height: 26px !important;
  display: grid;
  place-items: center;
  transform-origin: center center;
  pointer-events: auto;
}

.npn-adsb-plane-icon .plane {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: #dbeafe;
  font-size: 19px;
  line-height: 1;
  text-shadow:
    0 1px 4px rgba(0,0,0,.9),
    0 0 10px rgba(96,165,250,.75),
    0 0 2px rgba(255,255,255,.9);
}

.npn-adsb-plane-icon.stale .plane {
  opacity: .55;
}

.npn-adsb-tooltip {
  font-size: 12px;
  line-height: 1.25;
}

.npn-adsb-tooltip .t {
  font-weight: 900;
  margin-bottom: 4px;
}

.npn-adsb-tooltip .m {
  opacity: .72;
}

.leaflet-pane.npn-adsb-pane {
  z-index: 690 !important;
}

@media (max-width: 920px) {
  #npn-adsb-overlay-panel {
    top: 118px;
    left: 7px;
    width: 138px;
  }

  #npn-adsb-overlay-panel .npn-adsb-title {
    font-size: 8px;
  }

  #npn-adsb-overlay-panel .npn-adsb-row {
    font-size: 8px;
  }

  #npn-adsb-overlay-panel button {
    height: 22px;
    font-size: 8px;
    padding: 0 6px;
  }

  .npn-adsb-plane-icon .plane {
    font-size: 17px;
  }
}


/* NPN ADS-B PLANE SVG DIRECTION FIX v3 */
.npn-adsb-plane-icon {
  width: 28px !important;
  height: 28px !important;
  margin-left: -14px !important;
  margin-top: -14px !important;
}

.npn-adsb-plane-icon .plane {
  width: 28px !important;
  height: 28px !important;
  display: block !important;
  transform-origin: 50% 50% !important;
  filter:
    drop-shadow(0 1px 3px rgba(0,0,0,.95))
    drop-shadow(0 0 8px rgba(96,165,250,.85));
  font-size: 0 !important;
  line-height: 0 !important;
}

.npn-adsb-plane-icon .plane svg {
  width: 28px;
  height: 28px;
  display: block;
}

.npn-adsb-plane-icon.stale .plane {
  opacity: .55;
}

@media (max-width: 920px) {
  .npn-adsb-plane-icon,
  .npn-adsb-plane-icon .plane,
  .npn-adsb-plane-icon .plane svg {
    width: 24px !important;
    height: 24px !important;
  }

  .npn-adsb-plane-icon {
    margin-left: -12px !important;
    margin-top: -12px !important;
  }
}
