/* ============================================================
   NexGenTrend — WordPress-only adjustments.

   Kept separate from styles.css so the ported design system stays
   byte-identical to the static build and can be re-copied on update.

   Everything here exists because WordPress puts a 32px (46px under
   782px) fixed #wpadminbar above a page whose own chrome is also
   fixed to the viewport top.
   ============================================================ */

/* The bar height lives on <html> because the root scroll container is
   the only element that can pass it to scroll-padding-block-start. */
html.ngt-admin-bar {
  --ngt-bar: 32px;
  scroll-padding-block-start: calc(var(--hdr-h) + 18px + var(--ngt-bar));
}

@media screen and (max-width: 782px) {
  html.ngt-admin-bar { --ngt-bar: 46px; }
}

body.admin-bar .progress,
body.admin-bar .hdr,
body.admin-bar .skip {
  inset-block-start: var(--ngt-bar, 0px);
}

body.admin-bar .skip { inset-block-start: calc(var(--ngt-bar, 0px) + 0.75rem); }

/* Overlays sit below #wpadminbar (z-index 99999) in the stack, so they
   only need their top edge cleared to keep their controls reachable. */
body.admin-bar .scrim,
body.admin-bar .modal,
body.admin-bar .drawer {
  inset-block-start: var(--ngt-bar, 0px);
}

/* The checkout layer hangs below the site header, so it inherits the
   header's downward shift on top of its own offset. */
body.admin-bar .checkout {
  inset-block-start: calc(var(--hdr-h) + var(--ngt-bar, 0px));
}

@media (max-width: 860px) {
  body.admin-bar .nav { inset-block-start: var(--ngt-bar, 0px); }
}
