/* Reserve each section from the actual payment-column height. Loading and input
   state must not change the cashier frame or move the lower action buttons. */
@media (min-width: 960px) {
  .retail-shell.retail-reference .retail-shell-content .ref-checkout-column .ref-payment-panel {
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    gap: var(--space-1);
  }
  .retail-shell.retail-reference .retail-shell-content .ref-checkout-column .ref-payment-panel > .ref-payment-middle {
    overflow: visible;
    gap: var(--space-1);
  }
  .retail-shell.retail-reference .retail-shell-content .ref-checkout-column .ref-methods > button {
    height: 44px; min-height: 44px; padding-block: var(--space-1);
  }
  .retail-shell.retail-reference .retail-shell-content .ref-checkout-column .ref-totals { padding-block: var(--space-1); }
  .retail-shell.retail-reference .retail-shell-content .ref-checkout-column .ref-totals {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--space-2);
  }
  .retail-shell.retail-reference .retail-shell-content .ref-checkout-column .ref-totals > div:not(.ref-grand-total) {
    display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 0; min-height: 28px;
  }
  .retail-shell.retail-reference .retail-shell-content .ref-checkout-column .ref-totals .ref-grand-total { grid-column: 1 / -1; }
  .retail-shell.retail-reference .retail-shell-content .ref-checkout-column .ref-totals .ref-grand-total { margin-top: 0; padding-top: var(--space-1); min-height: 36px; }
  .retail-shell.retail-reference .retail-shell-content .ref-checkout-column .ref-keypad {
    height: clamp(188px, calc(100cqh - 560px), 268px);
    max-height: none; flex: none; gap: var(--space-1);
  }
  .retail-shell.retail-reference .retail-shell-content .ref-checkout-column :is(.ref-digits,.ref-keypad-side) { height: 100%; min-height: 0; gap: var(--space-1); }
  .retail-shell.retail-reference .retail-shell-content .ref-checkout-column .ref-digits { grid-template-rows: repeat(4, minmax(0, 1fr)); }
  .retail-shell.retail-reference .retail-shell-content .ref-checkout-column .ref-keypad button { height: 100%; min-height: 44px; padding-block: 0; }
  .retail-shell.retail-reference .retail-shell-content .ref-checkout-column .ref-cash-entry .input,
  .retail-shell.retail-reference .retail-shell-content .ref-checkout-column .ref-exact-tender { height: 44px; min-height: 44px; }
  .retail-shell.retail-reference .retail-shell-content .ref-checkout-column .ref-checkout-actions-list { gap: var(--space-1); }
  .retail-shell.retail-reference .retail-shell-content .ref-checkout-column .ref-checkout-shortcuts { padding-top: var(--space-1); }
  .retail-shell.retail-reference .retail-shell-content .ref-checkout-column .ref-customer { height: 44px; min-height: 44px; }
  .retail-shell.retail-reference .retail-shell-content .ref-checkout-column .ref-customer > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .retail-shell.retail-reference .retail-shell-content .ref-checkout-column .ref-cash-hint { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .retail-shell.retail-reference .ref-quick-strip { height: 72px; min-height: 72px; max-height: 72px; }
}
/* Extremely short windows retain access instead of clipping the controls. */
@container retail-payment (max-height: 619px) {
  .retail-shell.retail-reference .retail-shell-content .ref-checkout-column .ref-payment-panel > .ref-payment-middle { overflow-y: auto; }
}
/* Customer results own the scrolling; the editing frame stays the same while
   a query is loading, empty or populated. */
dialog.retail-credit-dialog:has(.retail-credit-list[aria-label="Müşteriler"]) {
  height: min(720px, calc(var(--dialog-viewport-height, 100dvh) - 24px));
}
dialog.retail-credit-dialog:has(.retail-credit-list[aria-label="Müşteriler"]) .dialog-scroll-body {
  display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto;
}
dialog.retail-credit-dialog .retail-credit-list[aria-label="Müşteriler"] { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
dialog.retail-credit-dialog .retail-credit-list[aria-label="Müşteriler"] > [role="status"] { min-height: 44px; }
