/* Header info panel (see info-modal.js). Sibling of the All apps panel in navig-ui.css: same surface, border, radius, shadow, easing and open animation.
   Desktop: dropdown under the "i" button. Phone (max 760px): bottom sheet with a grabber and scrim. Tokens come from navig-ui.css. */
.nv-info-panel, .nv-info-panel * { box-sizing: border-box; }
.nv-info-panel {
  position: fixed;
  top: 66px;
  right: 16px;
  z-index: 2100;
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100dvh - 90px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--nv-raised);
  color: var(--nv-ink);
  border: 1px solid var(--nv-line);
  border-radius: var(--nv-r);
  box-shadow: var(--nv-shadow);
  font-family: var(--nv-font);
  font-size: 0.9375rem;
  line-height: 1.45;
  transform-origin: calc(100% - 20px) 0;
}
.nv-info-panel[hidden] { display: none; }
.nv-info-panel.is-open { animation: nv-info-in 0.35s var(--nv-ease); }
.nv-info-panel.is-closing { animation: nv-info-out 0.2s var(--nv-ease) forwards; pointer-events: none; }
@keyframes nv-info-in { from { opacity: 0; transform: translateY(-6px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes nv-info-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(-6px) scale(0.97); } }
@keyframes nv-info-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes nv-info-down { from { transform: none; } to { transform: translateY(100%); } }

.nv-info-scrim { display: none; }

.info-grab { display: none; }
.info-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 12px 4px 18px; }
.info-title { margin: 0; font-size: 1.0625rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; }
.info-page { margin: 2px 0 0; color: var(--nv-muted); font-size: 0.8125rem; }
.info-modal-close {
  flex: none; width: 44px; height: 44px; margin: -6px 0 -6px 0;
  display: grid; place-items: center;
  border: 0; border-radius: var(--nv-r); background: transparent;
  color: var(--nv-muted); font: 400 24px/1 var(--nv-font); cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.2s var(--nv-ease);
}
.info-modal-close:hover { background: var(--nv-surface); color: var(--nv-ink); }
.info-modal-close:active { transform: scale(0.94); }
.nv-info-panel section { padding: 0 18px; }
.info-modal-section-title { margin: 14px 0 6px; color: var(--nv-muted); font: 500 0.6875rem var(--nv-mono); letter-spacing: 0.08em; text-transform: uppercase; }
.info-status { display: flex; align-items: flex-start; gap: 8px; margin: 10px 0 0; font-size: 0.8125rem; color: var(--nv-ink); }
.info-status i { flex: none; width: 6px; height: 6px; margin-top: 7px; border-radius: 50%; background: var(--nv-accent); box-shadow: 0 0 0 1px var(--nv-ink); }
.info-note { margin: 6px 0 0; font-size: 0.8125rem; color: var(--nv-muted); }
.info-ack-p { margin: 0; font-size: 0.75rem; line-height: 1.5; color: var(--nv-muted); }
.info-ack-p a, .info-note a, .info-modal-text a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.info-modal-text { margin: 0 0 8px; font-size: 0.8125rem; line-height: 1.5; color: var(--nv-ink); }

.info-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding: 10px 12px 10px 18px; border-top: 1px solid var(--nv-line); font-size: 0.8125rem; color: var(--nv-muted); }
.info-foot a { color: var(--nv-ink); text-decoration: underline; text-underline-offset: 3px; }
.info-support {
  position: relative; display: inline-flex; align-items: center; min-height: 30px; padding: 0 11px;
  border: 1px solid var(--nv-accent); border-radius: var(--nv-r);
  background: color-mix(in srgb, var(--nv-accent) 22%, #fff);
  color: var(--nv-accent-ink); font-size: 0.75rem; font-weight: 600; text-decoration: none !important; white-space: nowrap;
  transition: background 0.2s, transform 0.2s var(--nv-ease);
}
.info-support::after { content: ""; position: absolute; inset: -7px -4px; }
.info-support:hover { background: color-mix(in srgb, var(--nv-accent) 38%, #fff); }
.info-support:active { transform: scale(0.97); }
.nv-info-panel a:focus-visible, .nv-info-panel button:focus-visible { outline: 2px solid var(--nv-ink); outline-offset: 2px; }

/* Header buttons that open it: pressed look while open, like All apps */
.nv-info[aria-expanded="true"], .nav-info[aria-expanded="true"] { background: var(--nv-surface); border-color: var(--nv-ink); }

@media (max-width: 760px) {
  .nv-info-scrim { display: block; position: fixed; inset: 0; z-index: 2090; background: rgba(18, 19, 22, 0.3); opacity: 0; transition: opacity 0.25s var(--nv-ease); }
  .nv-info-scrim[hidden] { display: none; }
  .nv-info-scrim.is-open { opacity: 1; }
  .nv-info-panel {
    top: auto; right: 0; bottom: 0; left: 0; width: auto; max-height: 85dvh;
    border-width: 1px 0 0; border-radius: var(--nv-r) var(--nv-r) 0 0;
    padding-bottom: env(safe-area-inset-bottom);
    transform-origin: 50% 100%;
  }
  .nv-info-panel.is-open { animation: nv-info-up 0.38s var(--nv-ease); }
  .nv-info-panel.is-closing { animation: nv-info-down 0.24s var(--nv-ease) forwards; }
  .info-grab { display: flex; justify-content: center; padding: 10px 0 0; touch-action: none; cursor: grab; }
  .info-grab span { width: 36px; height: 4px; border-radius: 2px; background: var(--nv-line); }
  .info-head { padding-top: 8px; touch-action: none; }
}

@media (prefers-reduced-motion: reduce) {
  .nv-info-panel, .nv-info-panel *, .nv-info-scrim { animation: none !important; transition: none !important; }
}

/* Map legend (Sea): marker colour, shape and trail */
.info-legend { display: grid; gap: 8px; margin: 0; }
.info-legend .legend-row { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .82rem; color: var(--nv-ink); }
.info-legend .legend-row span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.legend-mark { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.speed-still { background: var(--nv-muted); } .speed-slow { background: var(--nv-warn); } .speed-fast { background: var(--nv-ok); }
.legend-shape { display: inline-block; width: 10px; height: 10px; background: var(--nv-ink); border-radius: 2px; }
.legend-shape.shape-triangle { width: 0; height: 0; background: transparent; border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 10px solid var(--nv-ink); border-radius: 0; }
.legend-shape.shape-circle { border-radius: 50%; }
.legend-shape.shape-diamond { transform: rotate(45deg); }
.legend-shape.shape-dot { width: 7px; height: 7px; border-radius: 50%; }
.legend-trail { display: inline-block; width: 16px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--nv-ink), transparent); }
.legend-notch { display: inline-block; width: 0; height: 0; border-left: 3px solid transparent; border-right: 3px solid transparent; border-bottom: 7px solid var(--nv-ink); }
/* Map controls (Sea): one row per control, name above its explanation */
.info-controls { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 8px; }
.info-controls li { display: grid; gap: 1px; font-size: .84rem; line-height: 1.4; color: var(--nv-ink); }
.info-controls strong { font-weight: 700; }
.info-controls span { color: var(--nv-muted, var(--nv-ink)); }
