/* ==========================================================================
   PRINT STYLESHEET: 80mm Thermal Receipt & A4 Official Job Slip
   ========================================================================== */

#print-area {
  display: none;
}

@media print {
  body * {
    visibility: hidden;
  }

  #print-area, #print-area * {
    visibility: visible;
  }

  #print-area {
    display: block !important;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    background: #ffffff !important;
    color: #000000 !important;
    font-family: 'Courier New', Courier, monospace, sans-serif;
  }

  /* 80mm Thermal Slip Optimization */
  .thermal-receipt {
    width: 78mm;
    margin: 0 auto;
    padding: 6mm 4mm;
    font-size: 11px;
    line-height: 1.35;
    color: #000;
  }

  .thermal-header {
    text-align: center;
    border-bottom: 1px dashed #000;
    padding-bottom: 6px;
    margin-bottom: 8px;
  }

  .thermal-header h2 {
    font-size: 16px;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 2px;
  }

  .thermal-header p {
    font-size: 10px;
    margin: 1px 0;
  }

  .thermal-ticket-id {
    display: inline-block;
    border: 1px solid #000;
    padding: 3px 8px;
    font-size: 14px;
    font-weight: 800;
    margin: 6px 0;
  }

  .thermal-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3px;
    font-size: 11px;
  }

  .thermal-row.bold {
    font-weight: 800;
  }

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

  .thermal-table {
    width: 100%;
    border-collapse: collapse;
    margin: 6px 0;
  }

  .thermal-table th, 
  .thermal-table td {
    font-size: 10.5px;
    padding: 3px 0;
    text-align: left;
  }

  .thermal-table th:last-child,
  .thermal-table td:last-child {
    text-align: right;
  }

  .thermal-pattern-box {
    border: 1px solid #000;
    padding: 4px;
    margin: 6px 0;
    text-align: center;
    font-size: 10px;
  }

  .thermal-barcode-box {
    text-align: center;
    margin: 8px 0 4px;
  }

  .thermal-barcode-box svg {
    max-width: 100%;
    height: 38px;
  }

  .thermal-terms {
    font-size: 8.5px;
    text-align: center;
    line-height: 1.25;
    border-top: 1px dashed #000;
    padding-top: 6px;
    margin-top: 8px;
  }

  /* A4 Invoice Mode */
  .a4-invoice {
    width: 100%;
    max-width: 210mm;
    margin: 0 auto;
    padding: 15mm 18mm;
    font-family: 'Plus Jakarta Sans', Arial, sans-serif;
    color: #1f2937;
  }

  .a4-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 2px solid #2563eb;
    padding-bottom: 15px;
    margin-bottom: 20px;
  }

  .a4-logo-text h1 {
    font-size: 24px;
    color: #1e3a8a;
    font-weight: 800;
  }

  .a4-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
  }

  .a4-table th {
    background: #f1f5f9;
    color: #334155;
    padding: 10px;
    text-align: left;
    border-bottom: 2px solid #cbd5e1;
    font-size: 12px;
    text-transform: uppercase;
  }

  .a4-table td {
    padding: 10px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 13px;
  }
}
