/**
 * Keep the custom fixed navigation below the native WordPress admin bar.
 * The extra selector specificity intentionally wins over GenerateBlocks inline
 * styles without modifying the generated header itself.
 */
html body .site-header2,
html body .site-header2.scrolled {
  z-index:99998 !important;
}

body.admin-bar {
  --rb-admin-bar-offset:32px;
}

html body.admin-bar #wpadminbar {
  display:block !important;
  visibility:visible !important;
  z-index:99999 !important;
  opacity:1 !important;
}

body.admin-bar .site-header2,
body.admin-bar .site-header2.scrolled {
  top:var(--rb-admin-bar-offset) !important;
}

@media screen and (max-width:782px) {
  body.admin-bar {
    --rb-admin-bar-offset:46px;
  }

  html body.admin-bar #wpadminbar {
    position:fixed !important;
    top:0 !important;
  }

  body.admin-bar .site-header2,
  body.admin-bar .site-header2.scrolled {
    top:calc(var(--rb-admin-bar-offset) + 5px) !important;
  }

  html:has(body.admin-bar.rb-collection-endpoint) {
    margin-top:46px !important;
  }
}

@media screen and (min-width:783px) and (max-width:860px) {
  html:has(body.admin-bar.rb-collection-endpoint) {
    margin-top:32px !important;
  }
}

@media screen and (max-width:768px) {
  body.admin-bar .rb-mobile-header {
    top:var(--rb-admin-bar-offset) !important;
    z-index:99995 !important;
  }

  body.admin-bar .rb-mobile-overlay {
    top:var(--rb-admin-bar-offset) !important;
    z-index:99996 !important;
  }

  body.admin-bar .rb-mobile-drawer {
    top:var(--rb-admin-bar-offset) !important;
    height:calc(100vh - var(--rb-admin-bar-offset)) !important;
    height:calc(100dvh - var(--rb-admin-bar-offset)) !important;
    z-index:99997 !important;
  }

  body.admin-bar .rb-mobile-search-bar {
    top:var(--rb-admin-bar-offset) !important;
    z-index:99998 !important;
  }
}
