/* Thermal printer stylesheet — hides the app and prints only the .printable
   element at the configured paper width. Body gets the class "print-58" or
   "print-80" right before window.print() to control width. */

@media print {
  /* Hide everything by default */
  body * { visibility: hidden !important; }
  /* Then reveal the printable target and its children */
  .printable, .printable * { visibility: visible !important; }
  .printable {
    position: absolute; left: 0; top: 0;
    width: 80mm; margin: 0; padding: 0;
    color: #000; background: #fff;
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 11px; line-height: 1.35;
  }
  body.print-58 .printable { width: 58mm; font-size: 10px; }
  /* Suppress any modal backdrop chrome */
  .sheet-wrap { background: transparent !important; box-shadow: none !important; }
  .receipt, .ticket-print { box-shadow: none !important; border: 0 !important; padding: 0 !important; background: #fff !important; }
  .receipt-actions, .print-only-hide { display: none !important; }
  @page { margin: 4mm; size: auto; }
}

/* Layout used by the printable receipt (kept readable on-screen too) */
.printable .pr-brand   { font-weight: 700; text-align: center; letter-spacing: 0.04em; }
.printable .pr-sub     { text-align: center; font-size: 10px; }
.printable .pr-rule    { border-top: 1px dashed #000; margin: 6px 0; }
.printable .pr-row     { display: flex; justify-content: space-between; }
.printable .pr-items   { width: 100%; border-collapse: collapse; margin: 4px 0; }
.printable .pr-items td { padding: 2px 0; vertical-align: top; }
.printable .pr-items td.r { text-align: right; white-space: nowrap; padding-left: 8px; }
.printable .pr-mod     { font-style: italic; opacity: 0.85; padding-left: 10px; }
.printable .pr-note    { padding-left: 10px; font-weight: 600; }
.printable .pr-total   { font-weight: 700; font-size: 14px; margin-top: 4px; }
.printable .pr-center  { text-align: center; }

/* Kitchen ticket */
.printable.ticket-print .pr-short { font-size: 28px; font-weight: 700; text-align: center; letter-spacing: 0.04em; }
.printable.ticket-print .pr-line  { font-size: 14px; margin: 4px 0; }
.printable.ticket-print .pr-line .qty { font-weight: 700; margin-right: 6px; }
