/* ==========================================================================
   THERMAL PRINT STYLESHEET (58mm & 80mm POS Thermal Receipt)
   Optimized for ESC/POS Thermal Printers
   ========================================================================== */

#thermal-print-target {
  display: none;
}

@media print {
  /* Hide all UI elements */
  body * {
    visibility: hidden;
  }

  /* Show only thermal print area */
  #thermal-print-target,
  #thermal-print-target * {
    visibility: visible;
  }

  #thermal-print-target {
    display: block !important;
    position: absolute;
    left: 0;
    top: 0;
    width: 58mm;
    margin: 0;
    padding: 2mm 3mm;
    background: #fff;
    color: #000;
    font-family: 'JetBrains Mono', 'Courier New', Courier, monospace;
    font-size: 11px;
    line-height: 1.35;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* 80mm modifier */
  #thermal-print-target.print-80mm {
    width: 80mm;
    padding: 3mm 5mm;
    font-size: 12px;
  }

  @page {
    size: auto;
    margin: 0mm;
  }

  .print-center {
    text-align: center;
  }
  
  .print-right {
    text-align: right;
  }

  .print-bold {
    font-weight: 700;
  }

  .print-title {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
  }

  .print-sub {
    font-size: 10px;
    line-height: 1.2;
  }

  .print-divider {
    border-top: 1px dashed #000;
    margin: 6px 0;
  }

  .print-double-divider {
    border-top: 2px double #000;
    margin: 6px 0;
  }

  .print-row {
    display: flex;
    justify-content: space-between;
    width: 100%;
  }

  .print-item-title {
    font-weight: 600;
    word-break: break-word;
  }

  .print-item-sub {
    display: flex;
    justify-content: space-between;
    padding-left: 8px;
    color: #222;
    font-size: 10px;
  }

  .print-total-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 700;
    margin-top: 4px;
  }

  .print-footer-note {
    text-align: center;
    font-size: 9px;
    margin-top: 10px;
    padding-bottom: 15mm; /* Extra feed for tear-off */
  }
}
