/**
 * Notification / cart off-canvas panel — footer visibility fix.
 *
 * Structure: .offcanvas-pure (height: 100vh, overflow: hidden)
 *              > .offcanvas-body-pure (flex column, fills remaining height)
 *                  > .notification-items-container / .cart-items-container (scrolls)
 *                  > .notification-footer / .cart-footer ("View All Notifications" /
 *                    "Checkout" — meant to always stay pinned at the bottom)
 *
 * On some viewport heights the scrollable middle section wasn't shrinking
 * the way the flex layout intended, so the footer button ended up pushed
 * below the panel's `overflow: hidden` boundary — invisible and
 * unreachable (no way to scroll to it) instead of just requiring a
 * scroll. This file forces the shrink behaviour and pins the footer as a
 * second line of defence, independent of the exact cause.
 *
 * Loaded LAST (after app.css / panel.css / merged-navbar.css /
 * pure-offcanvas*.css) in both layouts.php so it always wins regardless
 * of those files' internal load-order/!important fights.
 */

/* Dynamic viewport height where supported, so mobile browser chrome
   (address bar showing/hiding) is accounted for; 100vh stays as the
   fallback for browsers that don't support dvh. */
.offcanvas-pure {
    height: 100vh !important;
}

@supports (height: 100dvh) {
    .offcanvas-pure {
        height: 100dvh !important;
    }
}

/* Let the scrollable regions shrink below their content height instead
   of refusing to shrink and pushing the footer out of view. */
.offcanvas-body-pure,
.notification-items-container,
.cart-items-container {
    min-height: 0 !important;
}

/* Belt-and-braces: pin the footer to the bottom of the panel's own
   scroll area so it stays visible even if the flex sizing above is
   ever broken again by a future change. */
.notification-footer,
.cart-footer {
    position: sticky !important;
    bottom: 0 !important;
    z-index: 2 !important;
}
