/* =========================================================
   HAMBURGER MENU — 8 ITEMS VISIBLE + SCROLL
   Footer/login/address always fully visible
   ========================================================= */

#hamburgerMenu.menu-eight-visible-layout{
  display:flex !important;
  flex-direction:column !important;
  height:100vh !important;
  max-height:100vh !important;
  overflow:hidden !important;
}

/* Keep the menu title/header fixed */
#hamburgerMenu .hamburger-menu-head{
  flex:0 0 auto !important;
}

/*
  Show about 8 menu rows before scrolling.
  Each item is ~51px high including spacing/border.
*/
#hamburgerMenu .menu-eight-scroll-area{
  flex:0 0 auto !important;
  max-height:408px !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  padding-right:6px !important;
  scrollbar-width:thin !important;
  scrollbar-color:#8a8f98 transparent !important;
}

/* Chrome/Edge scrollbar */
#hamburgerMenu .menu-eight-scroll-area::-webkit-scrollbar{
  width:7px !important;
}
#hamburgerMenu .menu-eight-scroll-area::-webkit-scrollbar-track{
  background:transparent !important;
}
#hamburgerMenu .menu-eight-scroll-area::-webkit-scrollbar-thumb{
  background:#92979f !important;
  border-radius:10px !important;
}

/* Keep menu item heights consistent */
#hamburgerMenu .menu-eight-scroll-area > a{
  min-height:50px !important;
  display:flex !important;
  align-items:center !important;
  padding:0 14px !important;
  margin:0 !important;
  border-bottom:1px solid #edf0f4 !important;
}

/* Footer does not scroll */
#hamburgerMenu .menu-fixed-footer{
  flex:1 1 auto !important;
  min-height:0 !important;
  display:flex !important;
  flex-direction:column !important;
  justify-content:flex-start !important;
  background:#fff !important;
  border-top:1px solid #e4e8ee !important;
  padding:16px 16px 14px !important;
  overflow:visible !important;
}

/* Library Login button */
#hamburgerMenu .menu-fixed-footer > a,
#hamburgerMenu .menu-fixed-footer .library-login{
  flex:0 0 auto !important;
  margin:0 0 14px !important;
}

/* Address — fully visible */
#hamburgerMenu .menu-library-address{
  flex:0 0 auto !important;
  margin:0 !important;
  padding:14px 10px 4px !important;
  border-top:1px solid #e6eaf0 !important;
  color:#66748a !important;
  background:#fff !important;
}

#hamburgerMenu .menu-address-title{
  display:flex !important;
  align-items:flex-start !important;
  gap:8px !important;
  color:#0f1e4a !important;
  font-size:12px !important;
  line-height:1.4 !important;
}

#hamburgerMenu .menu-address-title i{
  color:#e58a00 !important;
  margin-top:2px !important;
  flex:0 0 auto !important;
}

#hamburgerMenu .menu-library-address p{
  margin:7px 0 0 20px !important;
  font-size:11px !important;
  line-height:1.55 !important;
  color:#6c788c !important;
}

/* Avoid floating Ask a Librarian button covering the address */
#hamburgerMenu ~ #askLibrarianFab,
#askLibrarianFab{
  z-index:9000 !important;
}

/* On shorter screens, reduce menu viewport slightly but preserve footer */
@media(max-height:760px){
  #hamburgerMenu .menu-eight-scroll-area{
    max-height:360px !important;
  }
}

@media(max-height:680px){
  #hamburgerMenu .menu-eight-scroll-area{
    max-height:310px !important;
  }
}

/* Mobile drawer width remains unchanged; only behavior is fixed */
@media(max-width:480px){
  #hamburgerMenu .menu-eight-scroll-area > a{
    min-height:48px !important;
  }
}
