/* v664 Customer desktop cart visibility integrity
   Scope: public Customer /order and customer Table QR on desktop only.
   Root cause repaired: the desktop checkout panel can be taller than the viewport.
   A sticky element taller than its viewport is allowed to slide out of view while
   the document scrolls, which hid the cart lines/subtotal even though items were
   successfully added. Keep the panel within the available viewport and make the
   panel itself the scroll owner. Phone/tablet cart-sheet behavior is untouched. */
@media (min-width:1280px){
  body.shop-page[data-staff-table-order="false"][data-staff-quick-order="false"] #order-panel,
  body.shop-page[data-staff-table-order="false"][data-staff-quick-order="false"] .order-panel{
    position:sticky!important;
    top:calc(var(--store-status-height-v290, 0px) + 104px)!important;
    align-self:start!important;
    max-height:calc(100dvh - var(--store-status-height-v290, 0px) - 124px)!important;
    min-height:0!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    overscroll-behavior:contain!important;
    -webkit-overflow-scrolling:touch!important;
    scrollbar-gutter:stable!important;
  }

  /* The ordered-food list remains its own bounded region at the top of checkout.
     This keeps several items usable without allowing the cart to consume the
     entire panel before customer details and checkout controls. */
  body.shop-page[data-staff-table-order="false"][data-staff-quick-order="false"] #order-panel .cart-list,
  body.shop-page[data-staff-table-order="false"][data-staff-quick-order="false"] .order-panel .cart-list{
    max-height:min(310px,34dvh)!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
  }
}
