/* Full-width, borderless geometry for both the original and floating header. */
html.site-pearl body.public-ui #siteMain > #topbar.topbar {
  box-sizing: border-box !important;
  position: sticky !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  flex-shrink: 0 !important;
  align-self: stretch !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: var(--compact-surface, #fff) !important;
  transform: none !important;
  overflow: visible !important;
  z-index: 1040 !important;
}

html.site-pearl body.public-ui #siteMain > #topbar.topbar::before,
html.site-pearl body.public-ui #siteMain > #topbar.topbar::after {
  content: none !important;
}

/* The original scrolls away; the floating header slides back in at the top edge. */
.header-float-placeholder {
  flex: 0 0 auto;
  width: 100%;
  height: var(--header-float-height, 51px);
  pointer-events: none;
}
.header-float-placeholder[hidden] { display: none !important; }

html.site-pearl body.public-ui #siteMain > #topbar.topbar.header-float-ready {
  position: relative !important;
}

html.site-pearl body.public-ui #siteMain > #topbar.topbar.header-float-ready.is-floating {
  position: fixed !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: translateY(-100%) !important;
  animation: none !important;
  transition: transform .36s cubic-bezier(.22,1,.36,1), opacity .24s ease,
    visibility 0s .36s !important;
}

html.site-pearl body.public-ui #siteMain > #topbar.topbar.header-float-ready.is-floating.is-floating-visible {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: translateY(0) !important;
  transition-delay: 0s !important;
}

@media (prefers-reduced-motion: reduce) {
  html.site-pearl body.public-ui #siteMain > #topbar.topbar.header-float-ready.is-floating {
    transition: none !important;
    animation: none !important;
  }
}
