/* Viewport-safe dialogs for phones, tablets and split-screen windows. */
@media screen and (max-width:1100px), screen and (pointer:coarse){
 html{zoom:1!important}
 body{max-width:100%;overflow-x:hidden}
 [role="dialog"]{box-sizing:border-box!important;min-width:0!important;max-width:100%!important;max-height:100dvh!important;overflow-y:auto;overscroll-behavior:contain}
 [role="dialog"] input,[role="dialog"] select,[role="dialog"] textarea{box-sizing:border-box;max-width:100%;min-width:0}
 [role="dialog"] img{max-width:100%;object-fit:contain}
 [role="dialog"] h2,[role="dialog"] p,[role="dialog"] b{overflow-wrap:anywhere}
 .purchaseTxnOverlay,.cashboxTxnOverlay{inset:0!important;width:100%!important;height:100dvh!important;min-height:0!important;max-height:100dvh!important}
 .purchaseTxnDrawer,.cashboxTxnDrawer{top:0!important;right:0!important;bottom:0!important;width:min(100%,620px)!important;min-width:0!important;height:100%!important;min-height:0!important;max-height:100%!important;overflow:hidden!important}
 .purchaseTxnDrawer{display:grid!important;grid-template-rows:auto auto minmax(0,1fr) auto!important}
 .cashboxTxnDrawer{display:grid!important;grid-template-rows:auto minmax(0,1fr) auto!important}
 .purchaseTxnHead,.cashboxTxnHead{height:auto!important;min-height:60px!important;padding:18px 54px 18px 16px!important;flex-shrink:0}
 .purchaseTxnHead h2,.cashboxTxnHead h2{font-size:clamp(16px,4vw,21px)!important;line-height:1.3!important}
 .purchaseTxnPrintWrap{padding:10px 14px!important}
 .purchaseTxnPrintBtn{min-height:44px!important;height:auto!important;padding:10px!important}
 .purchaseTxnScroll,.cashboxTxnScroll{min-height:0!important;overflow:auto!important;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:14px 14px 24px!important;scroll-padding-bottom:24px}
 .purchaseTxnFooter,.cashboxTxnFooter{position:relative!important;bottom:auto!important;height:auto!important;min-height:0!important;display:grid!important;visibility:visible!important;opacity:1!important;padding:12px 14px calc(12px + env(safe-area-inset-bottom,0px))!important;gap:8px!important;z-index:2;background:#fff!important}
 .purchaseTxnFooter{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 .purchaseTxnFooter button,.cashboxTxnFooter button{min-width:0!important;min-height:44px!important;height:auto!important;padding:10px 8px!important;white-space:normal!important;font-size:13px!important;line-height:1.35!important}
 .purchaseTxnProductMeta{margin-left:0!important;grid-template-columns:1fr!important}
 .purchaseTxnProductMeta span{text-align:left!important}
 .purchaseTxnDeleteConfirmOverlay{height:100dvh!important;min-height:0!important;max-height:100dvh!important}
 .purchaseTxnDeleteConfirmModal{width:min(94%,480px)!important;min-width:0!important;max-height:calc(100dvh - 24px)!important;overflow:auto!important}
 .productAddDrawer,.dueEntryDrawer,.saleDueDrawer,.dueItemDrawer,.cashInDrawer,.cashOutDrawer,.profileDrawer,.backupCenterDrawer,.contactDrawer,.accessUserDrawer,.bannerDrawer{min-width:0!important;width:min(100%,620px)!important;height:100dvh!important;max-height:100dvh!important;min-height:0!important}
 .productAddDrawer form,.bannerDrawer form{min-height:0;max-height:100%;overflow-y:auto}
 .bannerDrawerBody,.contactDrawerBody,.accessDrawerBody{min-height:0!important;overflow:auto!important}
 .bannerDrawerFooter,.contactDrawerFooter,.accessDrawerFooter{padding-bottom:calc(12px + env(safe-area-inset-bottom,0px))!important;flex-shrink:0}
 .tableWrap{max-width:100%;overflow-x:auto!important}
 #mobileCartReview344{height:100dvh!important;max-height:100dvh!important;min-height:0!important}
 .m344ReviewBody{min-height:0!important;overflow:auto!important}
}
@media screen and (max-width:400px){
 .purchaseTxnScroll,.cashboxTxnScroll{padding-left:10px!important;padding-right:10px!important}
 .m344ReviewCard{grid-template-columns:48px minmax(0,1fr) 20px!important;gap:8px!important}
 .m344ReviewQty{flex-wrap:wrap;row-gap:8px}.m344ReviewQty strong{font-size:13px}
}
