/* =========================================================
   V90 — WordPress admin bar + property-detail header fix
   - Keeps the WP admin toolbar above the theme header so its
     menus remain clickable while logged in.
   - Offsets overlay/fixed headers below the toolbar.
   - Gives single property pages the readable paper header.
   ========================================================= */

/* Never allow the front-end theme header to sit on top of WP admin controls. */
html body #site-header{
  z-index:9900!important;
}
html body.admin-bar #wpadminbar{
  z-index:1000000!important;
  pointer-events:auto!important;
}
html body.admin-bar #wpadminbar *{
  pointer-events:auto;
}

/* The overlay home/listings header must also clear the toolbar before scrolling. */
body.admin-bar #site-header[data-header-mode="home"],
body.admin-bar #site-header[data-header-mode="property"],
body.admin-bar #site-header[data-header-mode="paper"]{
  top:32px!important;
}
body.admin-bar .scroll-progress{
  top:32px!important;
}

/* Single-property pages now use the paper header. Keep page content below it. */
body.single-property .detail-top{
  padding-top:calc(var(--shg-header-h) + 38px)!important;
}
body.single-property .inquiry{
  top:calc(var(--shg-header-h) + 24px)!important;
}

/* Logged-in mobile/tablet offsets. */
@media(max-width:782px){
  body.admin-bar #site-header[data-header-mode="home"],
  body.admin-bar #site-header[data-header-mode="property"],
  body.admin-bar #site-header[data-header-mode="paper"]{
    top:46px!important;
  }
  body.admin-bar .scroll-progress{
    top:46px!important;
  }
  body.admin-bar .shg-mobile-drawer{
    top:46px!important;
    height:calc(100dvh - 46px)!important;
  }
}

@media(max-width:820px){
  body.single-property .detail-top{
    padding-top:calc(var(--shg-header-mobile-h) + 30px)!important;
  }
  body.single-property .inquiry{
    top:0!important;
  }
}
