/* BUILD199 — cashier footer refinement.
   User-approved hierarchy: TOTAL first, supporting totals next, F12 barcode is the very bottom row. */

/* The lower-left cashier footer is now:
   ROW 1: GRAND TOTAL | SUBTOTAL / DISCOUNT / DEPOSIT
   ROW 2: F12 BARCODE (full width, lowest control)
*/
.posScreen .cartFixedFooter{
  grid-template-columns:clamp(220px,24vw,330px) minmax(0,1fr)!important;
  grid-template-areas:
    "total summary"
    "barcode barcode"!important;
  align-items:stretch!important;
}

/* TOTAL is deliberately the first/left-most figure. */
.posScreen .cartTotal{
  grid-area:total!important;
  min-height:58px!important;
  padding:7px 12px!important;
  border:1px solid #075f37!important;
  background:linear-gradient(135deg,#043f27,#087a45)!important;
  border-radius:9px!important;
}
.posScreen .cartTotal .grandTotalLabel{
  font-size:8px!important;
  letter-spacing:.7px!important;
}
.posScreen .cartTotal strong{
  font-size:clamp(22px,2.15vw,34px)!important;
  line-height:1!important;
}

/* Supporting amounts stay beside TOTAL and are visually quieter. */
.posScreen .cartSummary{
  grid-area:summary!important;
  align-self:stretch!important;
}
.posScreen .cartSummary>span{
  min-height:58px!important;
}

/* F12 is always the final full-width row at the bottom of the transaction area. */
.posScreen .barcodeDock{
  grid-area:barcode!important;
  order:99!important;
  width:100%!important;
  min-height:45px!important;
  margin:0!important;
  border:2px solid #087545!important;
  background:#f6fcf8!important;
}
.posScreen .barcodeShortcut{
  background:linear-gradient(180deg,#076f40,#044f2e)!important;
  font-size:10px!important;
  font-weight:950!important;
}
.posScreen .barcodeDock input{
  background:#fff!important;
  border-color:#a9c9b6!important;
}
.posScreen .barcodeDock input:focus{
  border-color:#087a45!important;
  box-shadow:0 0 0 2px rgba(8,122,69,.10)!important;
}

/* Keep everything in the viewport; only cart lines may scroll internally. */
@media (min-width:1041px){
  body:has(main.posScreen),body:has(main.posScreen) #app,
  main.posScreen{overflow:hidden!important}
}

/* Short desktop monitors: keep F12 at the bottom without forcing page scroll. */
@media (min-width:1041px) and (max-height:760px){
  .posScreen .cartFixedFooter{gap:4px!important}
  .posScreen .cartTotal,.posScreen .cartSummary>span{min-height:45px!important;padding:4px 7px!important}
  .posScreen .cartTotal strong{font-size:20px!important}
  .posScreen .barcodeDock{min-height:37px!important;padding:3px!important}
  .posScreen .barcodeShortcut,.posScreen .barcodeDock input{height:29px!important;min-height:29px!important}
}

@media (max-width:1040px){
  .posScreen .cartFixedFooter{
    grid-template-columns:1fr!important;
    grid-template-areas:"total" "summary" "barcode"!important;
  }
}
