/*
 * Thermal Printer — Print Styles
 * ─────────────────────────────────────────────────────────────────────────────
 * Loaded once via <link media="print"> in index.html.
 * Previously injected via dangerouslySetInnerHTML inside InvoiceBill & KotBill
 * on every render, which polluted the DOM with duplicate <style> elements and
 * posed an XSS risk if any src value contained user-controlled markup.
 *
 * Thermal paper width: 68 mm (printable inside a 70 mm page with 1 mm margins)
 */

@media print {

  /* ── Page setup ─────────────────────────────────────────────────────────── */
  @page {
    size: 70mm auto;   /* 70 mm wide, height grows with content */
    margin: 0;
  }

  html,
  body {
    margin: 0;
    padding: 0;
    height: auto;
  }

  /* ── Hide everything by default ─────────────────────────────────────────── */
  body * {
    visibility: hidden;
  }

  /* ── Invoice Bill (#thermal-bill) ───────────────────────────────────────── */
  #thermal-bill,
  #thermal-bill * {
    visibility: visible;
    color: #000 !important;
  }

  #thermal-bill {
    position: fixed;
    left: 0;
    top: 0;
    width: 68mm;
    padding: 2mm;
    background: #fff;
    font-family: 'Open Sans', sans-serif !important;
  }

  /* ── KOT Bill (#kot-bill) ───────────────────────────────────────────────── */
  #kot-bill,
  #kot-bill * {
    visibility: visible;
    color: #000 !important;
  }

  #kot-bill {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    top: 0;
    width: 68mm;
    padding: 2mm;
    background: #fff;
    font-family: 'Open Sans', sans-serif !important;
  }

}
