/* Handphone checkout: one readable column. Keep the desktop two-column layout. */
@media screen and (max-width:700px) {
  #app .app-shell:has(#posBarcodeInput) .pos-checkout-fixed>.checkout>.pos-payment-card {
    padding:14px!important;
    border-radius:16px;
    width:100%!important;
  }
  #app .app-shell:has(#posBarcodeInput) .pos-checkout-fixed>.checkout>.pos-payment-card>.pos-payment-grid {
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    gap:16px!important;
    grid-template:none!important;
  }
  #app .app-shell:has(#posBarcodeInput) .pos-payment-grid> :is(.pos-payment-method,#cashPanel,.tax-box) {
    width:100%!important;
    min-width:0!important;
    grid-area:auto!important;
    grid-column:auto!important;
    grid-row:auto!important;
  }
  #app .app-shell:has(#posBarcodeInput) .pos-payment-grid>.tax-box {order:-1;padding:0 0 14px!important;border-bottom:1px solid #e2eaf3!important}
  #app .app-shell:has(#posBarcodeInput) .pos-payment-card label {font-size:13px!important;line-height:1.4;margin-bottom:7px!important;color:var(--text,#17324d)}
  #app .app-shell:has(#posBarcodeInput) .pos-payment-card .field {font-size:16px!important;min-height:46px;padding:11px 12px!important;border-radius:12px}
  #app .app-shell:has(#posBarcodeInput) .pos-payment-card .dhun-select-search {width:100%!important;min-width:0}
  #app .app-shell:has(#posBarcodeInput) .pos-payment-card .dhun-select-trigger {min-height:46px;font-size:16px}
  #app .app-shell:has(#posBarcodeInput) .pos-payment-grid>#cashPanel {gap:10px!important;align-items:stretch!important}
  #app .app-shell:has(#posBarcodeInput) .pos-cash-entry {width:100%!important}
  #app .app-shell:has(#posBarcodeInput) .pos-payment-card .pos-cash-actions {
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
    margin:0!important;
    width:100%;
  }
  #app .app-shell:has(#posBarcodeInput) .pos-cash-actions>#cashExact {grid-column:1/-1;background:#edf6ff}
  #app .app-shell:has(#posBarcodeInput) .pos-cash-actions>#cashQuick {display:contents!important}
  #app .app-shell:has(#posBarcodeInput) .pos-cash-actions button {
    min-height:44px!important;
    width:100%;
    min-width:0;
    margin:0;
    padding:9px 6px!important;
    font-size:13px!important;
    line-height:1.3;
    border-radius:12px;
    white-space:normal;
  }
  #app .app-shell:has(#posBarcodeInput) #cashShort {font-size:13px;line-height:1.4;margin:0!important}
  #app .app-shell:has(#posBarcodeInput) #cashShort:empty {display:none!important}
  #app .app-shell:has(#posBarcodeInput) .pos-payment-cash .cash-change {
    display:flex!important;
    flex-direction:row!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:12px;
    padding:12px!important;
    min-height:48px!important;
    border-radius:12px;
    background:#f1f8ff;
  }
  #app .app-shell:has(#posBarcodeInput) .cash-change span {font-size:13px!important;margin:0!important}
  #app .app-shell:has(#posBarcodeInput) .cash-change strong {font-size:18px!important;line-height:1.3;text-align:right;overflow-wrap:anywhere}
  #app .app-shell:has(#posBarcodeInput) .tax-box .pos-tax-heading {display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}
  #app .app-shell:has(#posBarcodeInput) .tax-box .receipt-row {font-size:14px!important;gap:12px;padding:5px 0}
  #app .app-shell:has(#posBarcodeInput) .tax-box .receipt-row :is(b,strong) {text-align:right;overflow-wrap:anywhere}
  #app .app-shell:has(#posBarcodeInput) .tax-box .total-line {padding:12px!important;border-radius:12px!important}
  #app .app-shell:has(#posBarcodeInput) .tax-box .total-line :is(span,strong) {font-size:19px!important;line-height:1.3}
  #app .app-shell:has(#posBarcodeInput) #taxToggle {min-height:40px;padding:7px 12px;font-size:13px}
  #app .app-shell:has(#posBarcodeInput) :is(#manualPaymentPanel,#memberLimitPanel) {width:100%;min-width:0;margin:0!important;padding:14px;border-radius:14px}
  #app .app-shell:has(#posBarcodeInput) :is(#manualPaymentPanel,#memberLimitPanel) .field {min-height:46px;font-size:16px;width:100%;min-width:0}
  #app .app-shell:has(#posBarcodeInput) .pos-checkout-fixed .pos-paybar {
    position:fixed!important;
    left:50%!important;
    transform:translateX(-50%)!important;
    bottom:var(--pos-nav-height,76px)!important;
    width:min(560px,100%)!important;
    z-index:30!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) minmax(110px,.7fr)!important;
    align-items:center;
    gap:12px;
    padding:12px 16px!important;
    margin:0!important;
    border-radius:0!important;
    background:#fff!important;
    border-top:1px solid #dce6ef;
    box-shadow:0 -4px 18px #123b6510;
  }
  #app .app-shell:has(#posBarcodeInput) .pos-paybar #co {min-height:48px;font-size:16px;margin:0}
  #app .app-shell:has(#posBarcodeInput) .pos-content.pos-has-items {padding-bottom:calc(var(--pos-nav-height,76px) + 112px)!important}
  #app .app-shell:has(#posBarcodeInput) #cashReceived {scroll-margin-block:110px 180px}
  /* The live method switch sets display:none. Do not let older grid overrides show cash fields. */
  #app .app-shell:has(#posBarcodeInput) #cashPanel:is([style*="display: none"],[style*="display:none"],[hidden]),
  #app .app-shell:has(#posBarcodeInput) :is(.checkout,.tax-box)[hidden] {display:none!important}
}
