/* ═══════════════════════════════════════════════════════════════════════════
   AUTO-HIDE FOR THE AFTERDARK NAV  (dx-sim-fix-afterdark-nav-autohide)
   Loaded AFTER seek-next-adnav.css. Presentation of ONE extra state only:
   html.adnav-away (set by seek-next-adah.js) lifts the pill out of view and
   fades it. The resting pill is untouched: without the class it has no
   transform at all, so it sits exactly where the approved nav sits.

   The motion is on the INNER pill, never on the .nav wrapper: the wrapper owns
   the -50% centring (transform) and the opening entrance (translate), and
   neither is rewritten here. Transform + opacity only — compositor work.
   ═══════════════════════════════════════════════════════════════════════════ */

/* the same top the approved nav uses, named so the hidden pose can clear it */
.nav {
  --adn-top: max(clamp(14px, 2.08vw, 30px), calc(env(safe-area-inset-top, 0px) + 8px));
  top: var(--adn-top);
}

/* RETURNING: a clean ease-out into the exact resting pose */
.adnav__pill {
  transition:
    transform 280ms cubic-bezier(.22, .8, .24, 1),
    opacity 220ms cubic-bezier(.22, .8, .24, 1);
}
/* LEAVING: straight up past the top edge (its own height + the top gap + the
   shadow), fading to 0 on a slightly shorter clock so it is gone before it
   reaches the edge. No scale, no rotation, no blur change. */
html.adnav-away .adnav__pill {
  transform: translate3d(0, calc(-100% - var(--adn-top) - 16px), 0);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 260ms cubic-bezier(.4, 0, .2, 1),
    opacity 200ms cubic-bezier(.4, 0, .2, 1);
}
/* prefers-reduced-motion: the page's global floor (seek-next-sfx.css §17)
   already makes every transition instant, so the nav simply appears/disappears. */
