/* CustodyMate — Hybrid-header layout fixes (Session 129)
   Pages using header_hybrid_session119.php + legacy footer.php.
   Load AFTER style.css and the header's inline styles so it wins without !important.

   v2 note: the sticky footer now targets ".page" (the shared layout wrapper opened
   in the hybrid header at line ~610 and closed in footer.php), NOT <body>. The footer
   lives INSIDE .page on every hybrid page, so margin-top:auto must act there. The
   earlier body-flex approach only worked on pages whose content already filled the
   viewport.
*/

/* ---- FIX 1: stacking — lift the sticky header (and the account dropdown it
   contains) above the footer; pin the footer to a low positioned layer. This is
   the functional fix that makes Log out / Delete Account reachable. ---- */
.cm-header { z-index: 1000; }
footer { position: relative; z-index: 1; }

/* Belt-and-suspenders for both dropdown variants (regular nav + account actions). */
.cm-nav__menu,
.cm-actions__menu { z-index: 1001; }

/* ---- FIX 2: sticky footer — make the .page wrapper a full-height flex column so
   the footer parks at the bottom of the viewport on short pages, killing the dead
   white space below it. .page wraps header + content + footer on every hybrid page. ---- */
.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.page > footer {
  margin-top: auto;   /* absorbs empty space, parking the footer at the bottom */
}

/* ---------------------------------------------------------------------------
   If a hybrid page ever nests the footer one level deeper than .page > footer,
   widen the selector to ".page footer { margin-top:auto }". Not needed for the
   current pages, where footer is a direct child of .page.
   --------------------------------------------------------------------------- */
