
/* WLF SCROLL + READABILITY REPAIR
   Final override: app pages must scroll in normal browser + PWA shells.
   Keep the fixed bottom nav, but never lock the whole app at 100vh.
*/
html.wlf-scroll-enabled,
html.wlf-scroll-enabled body{
  width:100%!important;
  min-width:0!important;
  height:auto!important;
  min-height:100%!important;
  max-height:none!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  overscroll-behavior-y:auto!important;
  position:static!important;
  touch-action:auto!important;
  -webkit-overflow-scrolling:touch!important;
}
html.wlf-scroll-enabled body{
  background:#f7fbff!important;
  color:#111827!important;
  padding-bottom:calc(118px + env(safe-area-inset-bottom,0px))!important;
}
html.wlf-scroll-enabled .shell,
html.wlf-scroll-enabled .app-shell{
  width:min(760px,100vw)!important;
  max-width:100vw!important;
  min-height:100vh!important;
  height:auto!important;
  max-height:none!important;
  margin-left:auto!important;
  margin-right:auto!important;
  overflow:visible!important;
  display:block!important;
  position:relative!important;
}
html.wlf-scroll-enabled .main,
html.wlf-scroll-enabled main,
html.wlf-scroll-enabled .shell .main{
  height:auto!important;
  min-height:auto!important;
  max-height:none!important;
  overflow:visible!important;
  overflow-y:visible!important;
  display:block!important;
  padding-bottom:calc(150px + env(safe-area-inset-bottom,0px))!important;
  scroll-behavior:smooth!important;
  -webkit-overflow-scrolling:touch!important;
}
html.wlf-scroll-enabled .page,
html.wlf-scroll-enabled .page.active{
  min-height:auto!important;
  max-height:none!important;
  overflow:visible!important;
  overflow-y:visible!important;
  padding-bottom:24px!important;
}
/* keep inactive pages hidden; several old overrides accidentally made all pages visible */
html.wlf-scroll-enabled .page:not(.active){
  display:none!important;
}
html.wlf-scroll-enabled .page.active{
  display:block!important;
}
/* Bottom nav: fixed, clickable, readable, and not blocking the whole page */
html.wlf-scroll-enabled .bot-nav,
html.wlf-scroll-enabled .bpf-global-bottom-nav,
html.wlf-scroll-enabled .bottom-nav{
  position:fixed!important;
  left:50%!important;
  right:auto!important;
  transform:translateX(-50%)!important;
  bottom:calc(10px + env(safe-area-inset-bottom,0px))!important;
  width:min(560px,calc(100vw - 24px))!important;
  max-width:calc(100vw - 24px)!important;
  min-height:56px!important;
  height:auto!important;
  z-index:99999!important;
  display:grid!important;
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  gap:4px!important;
  background:#ffffff!important;
  border:1px solid #b8d3ff!important;
  border-radius:20px!important;
  padding:7px!important;
  box-shadow:0 12px 34px rgba(7,27,74,.16)!important;
  pointer-events:auto!important;
}
html.wlf-scroll-enabled .bot-nav .bnav-item{
  min-width:0!important;
  min-height:44px!important;
  height:auto!important;
  padding:5px 2px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  flex-direction:column!important;
  border-radius:15px!important;
  background:transparent!important;
  border:0!important;
  color:#42526b!important;
  pointer-events:auto!important;
  cursor:pointer!important;
}
html.wlf-scroll-enabled .bot-nav .bnav-icon{display:none!important;}
html.wlf-scroll-enabled .bot-nav .bnav-label{
  font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif!important;
  font-size:13px!important;
  line-height:1.05!important;
  font-weight:800!important;
  letter-spacing:0!important;
  text-transform:none!important;
  color:inherit!important;
  -webkit-text-fill-color:currentColor!important;
}
html.wlf-scroll-enabled .bot-nav .bnav-item.active{
  background:#eaf2ff!important;
  border:1px solid #2f6fe8!important;
  color:#071b4a!important;
}
/* make the four daily action cards readable */
html.wlf-scroll-enabled .bpf-today-action,
html.wlf-scroll-enabled .bpf-direct-step,
html.wlf-scroll-enabled .today-focus-item{
  background:#eef5ff!important;
  background-image:none!important;
  border:1px solid #8fb6ff!important;
  color:#071b4a!important;
  -webkit-text-fill-color:#071b4a!important;
  text-shadow:none!important;
  opacity:1!important;
}
html.wlf-scroll-enabled .bpf-today-action *,
html.wlf-scroll-enabled .bpf-direct-step *,
html.wlf-scroll-enabled .today-focus-item *{
  color:#071b4a!important;
  -webkit-text-fill-color:#071b4a!important;
  text-shadow:none!important;
  opacity:1!important;
}
html.wlf-scroll-enabled .bpf-today-num,
html.wlf-scroll-enabled .bpf-direct-step strong:first-child{
  background:#2f6fe8!important;
  color:#ffffff!important;
  -webkit-text-fill-color:#ffffff!important;
  border-color:#2f6fe8!important;
}
/* readable modal/program overlays */
html.wlf-scroll-enabled .overlay .modal,
html.wlf-scroll-enabled .modal,
html.wlf-scroll-enabled .program-modal,
html.wlf-scroll-enabled .workout-modal,
html.wlf-scroll-enabled .player-modal,
html.wlf-scroll-enabled .guide-modal{
  background:#ffffff!important;
  color:#111827!important;
  border:1px solid #b8d3ff!important;
  box-shadow:0 24px 80px rgba(7,27,74,.28)!important;
}
html.wlf-scroll-enabled .overlay .modal *,
html.wlf-scroll-enabled .modal *,
html.wlf-scroll-enabled .program-modal *,
html.wlf-scroll-enabled .workout-modal *,
html.wlf-scroll-enabled .player-modal *,
html.wlf-scroll-enabled .guide-modal *{
  color:#111827!important;
  -webkit-text-fill-color:#111827!important;
  text-shadow:none!important;
}
html.wlf-scroll-enabled .modal .primary,
html.wlf-scroll-enabled .modal .btn.primary,
html.wlf-scroll-enabled .workout-modal .primary,
html.wlf-scroll-enabled .program-modal .primary{
  color:#ffffff!important;
  -webkit-text-fill-color:#ffffff!important;
}
/* desktop polish */
@media (min-width: 900px){
  html.wlf-scroll-enabled .shell{box-shadow:0 28px 80px rgba(31,79,159,.09)!important;}
}
/* short viewport: nav still safe */
@media (max-height: 680px){
  html.wlf-scroll-enabled .main{padding-bottom:calc(132px + env(safe-area-inset-bottom,0px))!important;}
  html.wlf-scroll-enabled .bot-nav{bottom:calc(6px + env(safe-area-inset-bottom,0px))!important;}
}
