/* RC6715: cash, EDC, voucher and discount details must never push Review/Checkout off screen.
   The desktop pane is bounded to the VISIBLE viewport by JS; no form IDs or handlers change. */
@media screen and (min-width:901px) {
 #posView.active .pos-layout .cart-panel {
   height:var(--rc6715-viewport-panel-height, 75dvh)!important;
   min-height:0!important;max-height:var(--rc6715-viewport-panel-height, 75dvh)!important;
   display:flex!important;flex-direction:column!important;overflow:hidden!important;
   overscroll-behavior:contain!important;
 }
 #posView.active .cart-panel > .cart-head {flex:0 0 auto!important;min-height:0!important;}
 #posView.active .cart-panel > #cartScrollBody {
   flex:1 1 0!important; min-height:26px!important; max-height:none!important;
   overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain!important;
 }
 #posView.active .cart-panel > #rc6711CashierDock {
   flex:0 1 auto!important;flex-shrink:1!important;
   max-height:min(48%, calc(var(--rc6715-viewport-panel-height, 75dvh) - 190px))!important;
   min-height:0!important; overflow:hidden!important;
   display:flex!important;flex-direction:column!important;
 }
 #posView.active .cart-panel > #rc6711CashierDock > #rc6712Details {
   flex:0 1 auto!important; min-height:0!important;
   max-height:min(26dvh, 215px)!important;
   overflow-y:auto!important;overflow-x:hidden!important;
   overscroll-behavior:contain!important;
 }
 #posView.active .cart-panel > #cartCheckoutFooter {
   flex:0 0 auto!important;flex-shrink:0!important;align-self:stretch!important;
   display:flex!important;flex-direction:column!important;
   position:relative!important;bottom:auto!important;z-index:8!important;
   min-height:0!important;margin-top:0!important;overflow:visible!important;
 }
}
/* Payment buttons remain visible even when the chosen form has to scroll internally. */
#posView #rc6711CashierDock #rc6712Details.has-details {scrollbar-gutter:stable!important;}
#posView #rc6711CashierDock #rc6712Details .rc6708-network-grid button {overflow-wrap:anywhere!important;}
#posView #cartCheckoutFooter #checkoutBtn {color:#fff!important;-webkit-text-fill-color:#fff!important;white-space:normal!important;}
@media screen and (min-width:901px) and (max-height:710px){
 #posView.active .cart-panel > #rc6711CashierDock > #rc6712Details {max-height: min(18dvh, 130px)!important;}
 #posView.active .cart-panel > #rc6711CashierDock #posPaymentNotice {display:none!important;}
}
/* On phones/tablets the standard page scroll remains usable; do not impose desktop height. */
@media screen and (max-width:900px){
 #posView .cart-panel > #cartCheckoutFooter {z-index:14!important;overflow:visible!important;}
 #posView .cart-panel > #rc6711CashierDock #rc6712Details {overflow-y:auto!important;}
}
/* Give the cashier's clickable controls priority over an expanded details form. */
#posView #rc6711CashierDock > .pos-offer-buttons {order:1!important;flex:0 0 auto!important;}
#posView #rc6711CashierDock > #posPaymentQuick {order:2!important;flex:0 0 auto!important;}
#posView #rc6711CashierDock > #rc6712Details {order:3!important;min-height:0!important;}
#posView #rc6711CashierDock > #rc6712Details.rc6712-ready.has-details {
  flex:1 1 auto!important;min-height:42px!important;overflow-y:auto!important;
}
@media (min-width:901px) and (max-height:760px){
 #posView.active .cart-panel > .cart-head {padding-bottom:4px!important;}
 #posView.active .cart-panel > #rc6711CashierDock {gap:3px!important;padding:4px 0!important;}
 #posView.active #rc6711CashierDock .pos-offer-buttons button {min-height:31px!important;padding:3px 3px!important;}
 #posView.active #rc6711CashierDock .pos-payment-buttons button {min-height:31px!important;padding:3px 2px!important;}
 #posView.active #rc6711CashierDock #posPaymentQuick {padding:3px 5px!important;}
 #posView.active #rc6711CashierDock #posPaymentNotice {display:none!important;}
}
@media screen and (min-width:901px){
 #posView.active .cart-panel > .cart-head {
   display:flex!important;align-items:center!important;justify-content:space-between!important;
   gap:8px!important;min-height:0!important;padding:4px 0 7px!important;
 }
 #posView.active .cart-panel > .cart-head h2 {margin:1px 0!important;font-size:17px!important;line-height:1.2!important;}
 #posView.active .cart-panel > .cart-head .eyebrow {font-size:9px!important;line-height:1.1!important;}
}
@media screen and (min-width:901px) and (max-height:650px) {
 #posView.active .cart-panel > #cartScrollBody {min-height:8px!important;}
 #posView.active #rc6711CashierDock #rc6712Details.has-details {min-height:28px!important;}
}
