/**
 * public/shared/print.css
 *
 * Shared thermal print styles (58mm / 80mm). Everything prints through the
 * machine's print dialog (window.print), or silently via the Windows print
 * bridge (tools/print-bridge) which renders the same HTML to PDF.
 *
 * Usage: print.js injects ticket/receipt HTML into #print-root, then calls
 * window.print(). On screen #print-root is hidden; in print media only
 * #print-root is shown. Widths: .ticket80.paper-80 (default) / .paper-58.
 */
#print-root { display: none; }

@media print {
  @page { size: 80mm auto; margin: 2mm; }
  html, body { margin: 0 !important; padding: 0 !important; background: #fff !important; }
  body > *:not(#print-root) { display: none !important; }
  #print-root { display: block !important; }

  .ticket80 {
    width: 72mm;
    font-family: "Courier New", Courier, monospace;
    color: #000;
    font-size: 12px;
    line-height: 1.35;
  }
  .ticket80.paper-58 { width: 50mm; font-size: 10px; }
  .ticket80 * { box-sizing: border-box; }
  .ticket80 .t-center { text-align: center; }
  .ticket80 .t-right { text-align: right; }
  .ticket80 .t-big { font-size: 20px; font-weight: 900; }
  .ticket80 .t-huge { font-size: 26px; font-weight: 900; }
  .ticket80.paper-58 .t-big { font-size: 15px; }
  .ticket80.paper-58 .t-huge { font-size: 19px; }
  .ticket80 .t-bold { font-weight: 700; }
  .ticket80 .rlogo { max-width: 46mm; max-height: 22mm; margin-bottom: 4px; }
  .ticket80.paper-58 .rlogo { max-width: 34mm; }
  .ticket80 hr.sep { border: none; border-top: 2px dashed #000; margin: 6px 0; }
  .ticket80 .t-row { display: flex; justify-content: space-between; gap: 4px; }
  .ticket80 .station-banner {
    font-size: 28px; font-weight: 900; text-align: center;
    border: 3px solid #000; padding: 4px; margin-bottom: 6px;
    text-transform: uppercase; letter-spacing: 1px;
  }
  .ticket80 .item-line { margin: 5px 0; page-break-inside: avoid; }
  .ticket80 .item-line .qty {
    display: inline-block; font-size: 22px; font-weight: 900;
    min-width: 1.6em;
  }
  .ticket80 .item-line .pname { font-size: 17px; font-weight: 700; }
  .ticket80.paper-58 .item-line .qty { font-size: 16px; }
  .ticket80.paper-58 .item-line .pname { font-size: 13px; }
  .ticket80 .item-line .mods { font-size: 12px; margin-left: 1.8em; }
  .ticket80 .item-line .notes {
    font-size: 13px; font-weight: 700; margin-left: 1.8em;
    border: 1px solid #000; padding: 2px 4px; margin-top: 2px;
  }
  .ticket80 .meta { font-size: 12px; }
  .ticket80 .foot { text-align: center; font-size: 13px; font-weight: 700; margin-top: 8px; }
}
