/* Base */
.bh-sticky {
  position: sticky;
  top: 0;
  z-index: var(--bh-z, 99);
}

/* When JS readies the element we pin it fixed for smooth reveal */
.bh-sticky.bh-sticky-ready {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  will-change: transform, opacity;
  transition: transform 0.6s ease, opacity 0.6s ease;
}

/* Scroll-up mode states */
.bh-sticky.bh-mode-scrollup.is-showing {
  transform: translateY(0);
  opacity: 1;
}
.bh-sticky.bh-mode-scrollup.is-hiding {
  transform: translateY(-100%);
  opacity: 0.98;
}

/* Always mode */
.bh-sticky.bh-mode-always.is-showing,
.bh-sticky.bh-mode-always {
  transform: translateY(0);
  opacity: 1;
}

/* Spacer to keep layout from jumping under fixed header */
.bh-sticky-spacer {
  display: block;
  height: 0; /* JS sets height */
  width: 100%;
}

/* Admin bar: move sticky header below the bar */
body.admin-bar .bh-sticky.bh-sticky-ready {
  top: 32px;
}

@media (max-width: 782px) {
  body.admin-bar .bh-sticky.bh-sticky-ready {
    top: 46px;
  }
}
