/* Open Library Theme — 2026-08-29 v48
 * Robust floating header on portal + journals, floating portal search,
 * and removal of the obsolete journal nav toggle artifact.
 */
:root{
  --ol48-header-h:70px;
  --ol48-search-left:0px;
  --ol48-search-width:100%;
  --ol48-search-gap:10px;
}

/* ---- Global header: float on every frontend page ---- */
html body .openlib_global_header{
  box-sizing:border-box!important;
  width:100%!important;
}
html body.openlib-global-header-fixed .openlib_global_header{
  position:fixed!important;
  top:0!important;
  left:0!important;
  right:0!important;
  width:100%!important;
  z-index:2200!important;
  margin:0!important;
  transform:none!important;
  box-shadow:0 8px 24px rgba(20,25,35,.10)!important;
}
html body .openlib_global_header_spacer{
  display:none;
  width:100%;
  height:0;
  margin:0;
  padding:0;
  border:0;
  pointer-events:none;
}
html body.openlib-global-header-fixed .openlib_global_header_spacer{
  display:block;
  height:var(--ol48-header-h)!important;
}

/* Journal header includes both the red identity row and navigation row. */
html body.openlib-journal-page.openlib-global-header-fixed .openlib_global_header{
  z-index:2250!important;
}

/* ---- Portal search floats below the fixed site header when reached ---- */
html body.openlib-site-index .pkp_structure_page,
html body.openlib-site-index .pkp_structure_content,
html body.openlib-site-index .pkp_structure_main,
html body.openlib-site-index .page_index_site{
  overflow:visible!important;
  transform:none!important;
  contain:none!important;
}
html body.openlib-site-index .openlib_search_sticky_placeholder{
  display:none;
  width:100%;
  height:0;
  margin:0;
  padding:0;
  border:0;
  pointer-events:none;
}
html body.openlib-site-index.openlib-search-is-fixed .openlib_search_sticky_placeholder{
  display:block;
}
html body.openlib-site-index.openlib-search-is-fixed .openlib_search_panel--primary{
  position:fixed!important;
  top:calc(var(--ol48-header-h) + var(--ol48-search-gap))!important;
  left:var(--ol48-search-left)!important;
  right:auto!important;
  width:var(--ol48-search-width)!important;
  max-width:none!important;
  margin:0!important;
  z-index:2100!important;
  transform:none!important;
  box-shadow:0 16px 38px rgba(118,16,25,.20)!important;
}
html body.openlib-site-index:not(.openlib-search-is-fixed) .openlib_search_panel--primary{
  position:relative!important;
  top:auto!important;
  left:auto!important;
  right:auto!important;
  width:100%!important;
  margin-left:0!important;
  margin-right:0!important;
}

/* ---- Definitive removal of the old red empty toggle before Publications ---- */
html body.openlib-journal-page .openlib_journal_nav_toggle,
html body.openlib-journal-page button.openlib_journal_nav_toggle,
html body.openlib-journal-page .pkp_site_nav_toggle.openlib_journal_nav_toggle{
  display:none!important;
  visibility:hidden!important;
  width:0!important;
  height:0!important;
  min-width:0!important;
  min-height:0!important;
  max-width:0!important;
  max-height:0!important;
  padding:0!important;
  margin:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
html body.openlib-journal-page .openlib_journal_navbar__inner{
  padding-left:0!important;
}
html body.openlib-journal-page .openlib_journal_home_nav{
  margin-left:0!important;
}

@media(max-width:767px){
  :root{--ol48-search-gap:7px;}
  html body.openlib-site-index.openlib-search-is-fixed .openlib_search_panel--primary{
    top:calc(var(--ol48-header-h) + var(--ol48-search-gap))!important;
  }
}
