/* FPPTI Jabar Theme 1.10.2
 * Sticky header correction.
 * The complete masthead + journal navigation stay together as ONE sticky unit.
 * This explicitly neutralizes the older JS/CSS rule that detached only the nav row.
 * Versioned filename avoids stale browser/proxy/CDN caches.
 */

html body.openlib-journal-page .openlib_journal_header {
  position: sticky !important;
  top: 0 !important;
  z-index: 1400 !important;
  width: 100% !important;
  margin: 0 !important;
  background: rgba(255,255,255,.985) !important;
  box-shadow: 0 1px 0 rgba(203,213,225,.78), 0 10px 28px rgba(15,23,42,.075) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  backdrop-filter: blur(12px) !important;
  isolation: isolate !important;
}

/* Never allow the legacy nav-only sticky state to detach the second row. */
html body.openlib-journal-page .openlib_journal_header__utility,
html body.openlib-journal-page .openlib_journal_header__identity,
html body.openlib-journal-page .openlib_journal_header__navrow,
html body.openlib-journal-page.openlib-journal-nav-stuck .openlib_journal_header__navrow {
  position: relative !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  width: auto !important;
  margin: 0 !important;
}

/* The old sticky-nav script inserts a spacer and gives it an inline height.
 * It is no longer needed because the parent header itself is sticky. */
html body.openlib-journal-page .openlib_journal_nav_spacer,
html body.openlib-journal-page.openlib-journal-nav-stuck .openlib_journal_nav_spacer {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Restore the normal nav-row appearance even if the legacy JS toggles its body class. */
html body.openlib-journal-page.openlib-journal-nav-stuck .openlib_journal_header__navrow {
  border-top: 0 !important;
  border-bottom: 1px solid #DCE7F3 !important;
  background: rgba(255,255,255,.97) !important;
  box-shadow: 0 4px 16px rgba(15,23,42,.035) !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

/* 1.10.0 aligns title + account controls in one desktop masthead row.
 * Keep that overlay inside the sticky parent. */
@media (min-width: 901px) {
  html body.openlib-journal-page .openlib_journal_header__identity {
    position: absolute !important;
    top: 4px !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
  }
}

html[data-openlib-color-mode="dark"] body.openlib-journal-page .openlib_journal_header {
  background: rgba(23,35,56,.985) !important;
  box-shadow: 0 1px 0 #40536D, 0 12px 30px rgba(0,0,0,.30) !important;
}
html[data-openlib-color-mode="dark"] body.openlib-journal-page.openlib-journal-nav-stuck .openlib_journal_header__navrow {
  border-bottom-color: #40536D !important;
  background: #1D2C43 !important;
  box-shadow: 0 4px 16px rgba(0,0,0,.12) !important;
}

html body.openlib-journal-page {
  scroll-padding-top: 155px !important;
}
@media (max-width: 900px) {
  html body.openlib-journal-page {
    scroll-padding-top: 180px !important;
  }
}
