/* Screen receipt paper. Controls remain outside the fixed 80 mm paper. */
@media screen {
  .dp-receipt-paper80,
  #odReceiptContent > [data-local-paid-receipt="true"],
  #tabTables .receipt {
    box-sizing: border-box;
    width: 80mm !important;
    min-width: 80mm;
    max-width: 80mm !important;
    margin-left: auto;
    margin-right: auto;
    padding: 4mm;
    border: 1px solid #d8d8d8;
    border-radius: 0;
    background: #fff;
    color: #000;
    box-shadow: 0 2px 10px #0002;
    font-family: "Courier New", Courier, monospace;
    overflow-wrap: normal;
    flex-shrink: 0;
  }
  .dp-receipt-viewport80,
  #odReceiptContent {
    min-width: 0;
    overflow: auto !important;
    background: #eef0f2;
  }
  .dp-receipt-paper80:has(> [data-print-preview="true"]) {
    /* The canonical renderer owns its padding and border. */
    padding: 0;
    border: 0;
    box-shadow: none;
  }
  #tabTables:has(.receipt) { overflow-x: auto; }

  #odReceiptCard,
  #checkoutDeliveryChoice > div {
    width: 90mm !important;
    max-width: calc(100vw - 24px) !important;
    height: auto !important;
    max-height: min(78dvh, 640px) !important;
    box-sizing: border-box;
  }
  #checkoutDeliveryChoice > div { padding: 8px !important; }
  #checkoutDeliveryChoice [data-checkout-preview] {
    padding: 4px !important;
    flex: 0 1 auto;
  }
  #checkoutDeliveryChoice button[data-action] {
    padding: 10px 6px !important;
    white-space: nowrap;
  }
  #odReceiptContent {
    flex: 0 1 auto !important;
    padding: 48px 8px 8px !important;
  }
  #odReceiptContent > [data-local-paid-receipt="true"] {
    padding: 2mm;
    line-height: 1.25 !important;
  }
  #odReceiptContent > [data-local-paid-receipt="true"] td {
    padding-top: 2px !important;
    padding-bottom: 2px !important;
  }
}
