/* NEXORA PROD169 — responsive POS bottom area, no absolute pinning */
#nxDirectPrintStatus{display:none!important}

/* Let the cart column own its height and let the cart table shrink first. */
#pos .touch-pos-cart{
  display:flex!important;
  flex-direction:column!important;
  gap:5px!important;
  padding:6px!important;
  padding-bottom:6px!important;
  min-height:0!important;
  height:100%!important;
  overflow:hidden!important;
  position:relative!important;
}
#pos .touch-pos-carthead,
#pos .touch-pos-customerrow,
#pos .touch-pos-totals,
#pos .touch-pos-paymethods,
#pos .nx-split-payment,
#pos .touch-pos-cashpanel,
#pos .touch-pos-checkout,
#pos .touch-pos-secondary-actions{
  flex:0 0 auto!important;
}
#pos .touch-pos-carttable{
  flex:1 1 100px!important;
  min-height:72px!important;
  height:auto!important;
  max-height:none!important;
  overflow:auto!important;
}

/* Row 1: received | exact | customer change */
#pos .touch-pos-cashpanel{
  position:static!important;
  inset:auto!important;
  display:grid!important;
  grid-template-columns:minmax(0,1.35fr) minmax(125px,.8fr) minmax(0,1fr)!important;
  grid-template-areas:"received exact change"!important;
  align-items:stretch!important;
  gap:5px!important;
  min-height:52px!important;
  height:auto!important;
  padding:0!important;
  margin:0!important;
  background:#fff!important;
  visibility:visible!important;
  opacity:1!important;
  z-index:auto!important;
}
#pos .touch-pos-cashline{
  grid-area:received!important;
  display:grid!important;
  grid-template-columns:auto 1fr!important;
  align-items:center!important;
  gap:6px!important;
  min-height:52px!important;
  margin:0!important;
  padding:5px 7px!important;
  border:1px solid #dce3ea!important;
  border-radius:10px!important;
  background:#fff!important;
}
#pos .touch-pos-cashline label{font-size:11px!important;font-weight:900!important;white-space:nowrap!important;margin:0!important}
#pos .touch-pos-cashline input{height:40px!important;min-height:40px!important;font-size:18px!important;font-weight:900!important;text-align:center!important;padding:3px 7px!important}
#pos .touch-pos-quickcash{
  grid-area:exact!important;
  display:flex!important;
  min-height:52px!important;
  margin:0!important;
}
#pos .touch-pos-quickcash button{
  width:100%!important;
  min-height:52px!important;
  height:52px!important;
  margin:0!important;
  padding:5px!important;
  font-size:16px!important;
  font-weight:900!important;
  border-radius:10px!important;
  white-space:nowrap!important;
}
#pos .touch-pos-change{
  grid-area:change!important;
  display:grid!important;
  grid-template-columns:1fr auto!important;
  align-items:center!important;
  gap:5px!important;
  min-height:52px!important;
  height:52px!important;
  margin:0!important;
  padding:5px 9px!important;
  border:1px solid #dce3ea!important;
  border-radius:10px!important;
  background:#fff!important;
  visibility:visible!important;
  opacity:1!important;
}
#pos .touch-pos-change span{font-size:11px!important;font-weight:900!important;white-space:nowrap!important}
#pos .touch-pos-change b{font-size:18px!important;font-weight:900!important;color:#147a45!important}

/* Row 2: save | pay+print | pay+send */
#pos .touch-pos-checkout{
  position:static!important;
  inset:auto!important;
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:5px!important;
  min-height:38px!important;
  height:auto!important;
  padding:0!important;
  margin:0!important;
  background:#fff!important;
  visibility:visible!important;
  opacity:1!important;
  z-index:auto!important;
}
#pos .touch-pos-checkout button,
#pos .touch-pos-checkout .touch-payprint,
#pos .touch-pos-checkout .touch-save{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:38px!important;
  height:38px!important;
  margin:0!important;
  padding:4px 7px!important;
  border-radius:9px!important;
  font-size:11px!important;
  font-weight:900!important;
  white-space:nowrap!important;
  visibility:visible!important;
  opacity:1!important;
}

/* Row 3: compact utility buttons */
#pos .touch-pos-secondary-actions{
  position:static!important;
  inset:auto!important;
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:5px!important;
  min-height:34px!important;
  height:auto!important;
  padding:0!important;
  margin:0!important;
  background:#fff!important;
  z-index:auto!important;
}
#pos .touch-pos-secondary-actions .touch-lastprint,
#pos .touch-pos-secondary-actions button{
  min-height:34px!important;
  height:34px!important;
  margin:0!important;
  padding:3px 4px!important;
  border-radius:8px!important;
  font-size:9px!important;
  line-height:1.05!important;
  font-weight:900!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}

/* Mixed payment: split box replaces cash row, but checkout/actions remain in normal flow. */
#pos.nx-pos-mixed .touch-pos-cashpanel{display:none!important}
#pos.nx-pos-mixed .nx-split-payment{
  display:block!important;
  max-height:150px!important;
  overflow:auto!important;
  margin:0!important;
  padding:7px!important;
}
#pos.nx-pos-mixed .touch-pos-checkout,
#pos.nx-pos-mixed .touch-pos-secondary-actions{display:grid!important}

@media(max-height:760px){
  #pos .touch-pos-cart{gap:3px!important;padding:4px!important}
  #pos .touch-pos-carttable{min-height:56px!important}
  #pos .touch-pos-cashpanel{grid-template-columns:minmax(0,1.2fr) minmax(105px,.75fr) minmax(0,.9fr)!important;min-height:46px!important}
  #pos .touch-pos-cashline,#pos .touch-pos-quickcash,#pos .touch-pos-change{min-height:46px!important;height:46px!important}
  #pos .touch-pos-cashline input{height:34px!important;min-height:34px!important;font-size:16px!important}
  #pos .touch-pos-quickcash button{height:46px!important;min-height:46px!important;font-size:14px!important}
  #pos .touch-pos-change b{font-size:16px!important}
  #pos .touch-pos-checkout button,#pos .touch-pos-checkout .touch-payprint,#pos .touch-pos-checkout .touch-save{height:34px!important;min-height:34px!important;font-size:10px!important}
  #pos .touch-pos-secondary-actions .touch-lastprint,#pos .touch-pos-secondary-actions button{height:31px!important;min-height:31px!important;font-size:8.5px!important}
}

@media(max-width:980px){
  #pos .touch-pos-cashpanel{grid-template-columns:minmax(0,1.1fr) minmax(105px,.72fr) minmax(0,.9fr)!important}
  #pos .touch-pos-secondary-actions{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

/* PROD215 — final cashier one-viewport contract */
body:has(#pos.section.show){overflow:hidden!important}
#pos .touch-pos-product-grid,#pos .touch-pos-carttable{overflow:hidden!important}
#pos.nx-pos-mixed .nx-split-payment{overflow:hidden!important}
#pos #nxTerminalBox{
  margin:0!important;padding:4px 7px!important;min-height:32px!important;
  display:grid!important;grid-template-columns:auto minmax(0,1fr) auto!important;
  align-items:center!important;gap:6px!important;font-size:9px!important;flex:0 0 auto!important
}
#pos #nxTerminalBox>b{font-size:9px!important;white-space:nowrap}
#pos #nxTerminalStatus{margin:0!important;font-size:8.5px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#pos #nxTerminalBox>div:nth-of-type(2){margin:0!important;gap:4px!important;flex-wrap:nowrap!important}
#pos #nxTerminalBox>div:nth-of-type(2) button{min-height:28px!important;height:28px!important;padding:2px 6px!important;font-size:8px!important}
#pos #nxTerminalBox>div:nth-of-type(2) label{font-size:8px!important;white-space:nowrap}
#pos #nxTerminalBox>small{display:none!important}
@media(max-height:720px){
 #pos .touch-pos-cart{gap:2px!important;padding:3px!important}
 #pos .touch-pos-carttable{min-height:46px!important}
 #pos .touch-pos-totals>div{min-height:30px!important;padding:3px 5px!important}
 #pos .touch-pay{min-height:30px!important}
 #pos #nxTerminalBox{min-height:28px!important;padding:2px 5px!important}
}

/* PROD263: reserve room for the real header and at least one complete cart row. */
#pos .touch-pos-carttable{min-height:82px!important}
/* Earlier immersive styles used a footer padding and fixed mixed-cart height.
   The footer now participates in flex flow, so reserve it exactly once. */
#pos.nx-pos-mixed .touch-pos-cart{padding-bottom:6px!important}
#pos.nx-pos-mixed .touch-pos-carttable{flex:1 1 82px!important;min-height:82px!important;max-height:none!important;height:auto!important}
#pos.nx-pos-mixed .nx-split-payment{max-height:none!important;padding:5px 7px!important}
#pos.nx-pos-mixed .nx-split-grid input{height:32px!important;min-height:32px!important;font-size:15px!important;padding:3px!important}
#pos.nx-pos-mixed .nx-split-summary{margin-top:4px!important;gap:5px!important;font-size:11px!important}
#pos.nx-pos-mixed .nx-split-summary span{min-height:24px!important;padding:2px 5px!important}
#pos.nx-pos-mixed #posSplitRemain{font-size:15px!important}
#pos.nx-pos-mixed .nx-split-summary b{font-size:15px!important}
/* Leave the cart pager in the viewport on shorter cashier displays. */
@media(max-height:800px){
 #pos .touch-pos-totals>div{min-height:36px!important;padding:4px 6px!important}
 #pos #posDiscountPercent{height:30px!important;min-height:30px!important;margin:3px 0!important;padding:3px!important;font-size:14px!important}
 #pos #nxPosDiscountLimit{font-size:10px!important;line-height:1.2!important;margin-top:2px!important}
}
@media(max-height:760px){
 #pos .touch-pos-totals{margin-top:0!important}
 #pos .touch-pos-totals>div{min-height:30px!important;padding:3px 5px!important}
 #pos .nx-pos-pager{margin-top:0!important}
 #pos.nx-pos-mixed .touch-pos-cart{padding-bottom:3px!important}
}
