/* ============================================================
   ROOTWORTH — homepage redesign 2026-10: WordPress integration.
   NOT part of the lab. Loaded after rw-home.css, only on pages
   using template-rw-home.php. Covers things that exist only on
   the live site: the logged-in admin bar and the consent
   "Cookie preferences" pill (mu-plugin rw-consent.php).
   marker: spidey rootworth-home-redesign-2026-10
   ============================================================ */

/* Logged-in admin bar: keep the sticky header below it.
   WP's admin bar is fixed 32px (>782px), fixed 46px (601–782px),
   and scrolls away (position:absolute) at <=600px. */
.admin-bar .rw-head{top:32px}
@media screen and (max-width:782px){.admin-bar .rw-head{top:46px}}
@media screen and (max-width:600px){.admin-bar .rw-head{top:0}}
html:has(body.admin-bar){scroll-padding-top:calc(var(--head-h) + 44px)}

/* The consent reopen pill is fixed at left:12px/bottom:12px (~26px tall).
   Give the footer's last line room so the pill never sits on the
   copyright line when scrolled to the very bottom. */
body:has(#vd-consent-reopen) .rw-foot{padding-bottom:calc(2.2rem + 40px)}

/* Phones: lift the consent pill/banner above the sticky intake bar (48px). */
@media (max-width:768px){
  #vd-consent-reopen{bottom:calc(58px + env(safe-area-inset-bottom,0px)) !important}
  #vd-consent{bottom:calc(60px + env(safe-area-inset-bottom,0px)) !important}
}
