/* Sticky navigation must be contained by the whole job page. ui-view is
   otherwise inline, and Angular Material gives body a 100% height, allowing
   the content to overflow the box that bounds the sticky navigation.
   The server-rendered d/jv page places its header directly inside body. */
body:has(> ui-view > #main-header.public-search-job-header),
body:has(> #main-header.public-search-job-header),
body:has(ui-view[name="header"] > #main-header.public-search-job-header) {
  height: auto;
  min-height: 100vh;
}

ui-view:has(> #main-header.public-search-job-header),
ui-view:has(> ui-view[name="header"] > #main-header.public-search-job-header) {
  display: flow-root;
}

/* Company pages split header/content/footer into named views. Let navigation
   stick within the whole page instead of the short header-only view. */
ui-view[name="header"]:has(> #main-header.public-search-job-header) {
  display: contents;
}

/* Sticky navigation stays in flow, so the old mobile fixed-header spacer is
   no longer needed on the public company page. */
body:has(ui-view[name="header"] > #main-header.public-search-job-header) {
  padding-top: 0 !important;
}

/* Parked dialogs are absolute and 100% tall. Their shared 30px margins would
   extend below the now full-height body and leave a blank strip after the
   footer. Angular Material moves opened dialogs out of these hidden wrappers. */
ui-view:has(> #main-header.public-search-job-header) > div[style*="visibility: hidden"] > .md-dialog-container.common-md-popup {
  margin-top: 0;
  margin-bottom: 0;
}

/* Flatten only the visitor job header's layout box so its navigation can
   stick independently while the two banners scroll in normal document flow. */
#main-header.public-search-job-header {
  display: contents;
}

#main-header.public-search-job-header nav.navbar.bootsnav.custom-navbar-header,
#main-header.public-search-job-header nav.navbar.bootsnav.custom-navbar-header.navbar-fixed {
  position: -webkit-sticky;
  position: sticky;
  top: 0 !important;
  z-index: 8;
}

#app-install-bnr-wrap.public-search-job-banner {
  position: relative !important;
}

#app-install-bnr-spacer.public-search-job-banner-spacer {
  display: none !important;
}

#main-header.public-search-job-header #candidate-signup-btn,
#main-header.public-search-job-header #candidate-signup-btn-mobile {
  background-color: var(--accent-blue);
  border-color: var(--accent-blue);
  color: var(--white);
}

#main-header.public-search-job-header .login-dropdown {
  background-color: var(--white);
  border-color: var(--gray-300);
  color: var(--gray-800);
  font-weight: 600;
}
