/* ==========================================================================
   PRINT STYLESHEET
   Supports A4 Invoices and Thermal Receipt 58mm / 80mm
   ========================================================================== */

@media print {
  /* Sembunyikan elemen navigasi dan kontrol layar */
  body, html {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 12pt;
    margin: 0 !important;
    padding: 0 !important;
  }

  .app-sidebar,
  .app-header,
  .mobile-nav-bar,
  .btn,
  .btn-primary-modern,
  .btn-secondary-modern,
  .no-print,
  .modal-footer,
  .modal-header .btn-close,
  #toast-container {
    display: none !important;
  }

  #app-layout {
    display: block !important;
  }

  .app-main {
    margin: 0 !important;
    padding: 0 !important;
  }

  .page-container {
    padding: 0 !important;
  }

  /* Printable Area Container */
  .printable-area {
    display: block !important;
    margin: 0 auto;
    background: #ffffff;
    color: #000000;
  }

  /* FORMAT NOTA A4 */
  .print-format-a4 {
    width: 100%;
    max-width: 210mm;
    margin: 0 auto;
    padding: 15mm;
    font-family: Arial, sans-serif;
    line-height: 1.4;
  }

  .print-format-a4 .invoice-header {
    display: flex;
    justify-content: space-between;
    border-bottom: 2px solid #000000;
    padding-bottom: 12px;
    margin-bottom: 15px;
  }

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

  .print-format-a4 th,
  .print-format-a4 td {
    border: 1px solid #333333;
    padding: 6px 8px;
    font-size: 10pt;
  }

  .print-format-a4 th {
    background-color: #f2f2f2 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* FORMAT THERMAL 58mm / 80mm */
  .print-format-thermal-58 {
    width: 48mm;
    font-family: 'Courier New', Courier, monospace;
    font-size: 9pt;
    line-height: 1.2;
    padding: 2mm;
    margin: 0 auto;
  }

  .print-format-thermal-80 {
    width: 72mm;
    font-family: 'Courier New', Courier, monospace;
    font-size: 10pt;
    line-height: 1.3;
    padding: 4mm;
    margin: 0 auto;
  }

  .thermal-receipt {
    text-align: center;
  }

  .thermal-receipt .store-name {
    font-size: 12pt;
    font-weight: bold;
    text-transform: uppercase;
  }

  .thermal-receipt .store-sub {
    font-size: 8pt;
    margin-bottom: 5px;
  }

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

  .thermal-receipt .meta-row {
    display: flex;
    justify-content: space-between;
    font-size: 8.5pt;
    text-align: left;
  }

  .thermal-receipt .item-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 8.5pt;
    margin: 5px 0;
  }

  .thermal-receipt .item-table td {
    padding: 2px 0;
  }

  .thermal-receipt .item-name {
    text-align: left;
    font-weight: bold;
  }

  .thermal-receipt .item-calc {
    text-align: right;
  }

  .thermal-receipt .total-section {
    width: 100%;
    border-top: 1px dashed #000000;
    margin-top: 5px;
    padding-top: 5px;
    font-size: 9pt;
  }

  .thermal-receipt .total-row {
    display: flex;
    justify-content: space-between;
    padding: 2px 0;
  }

  .thermal-receipt .grand-total-row {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    font-size: 11pt;
    border-top: 1px solid #000000;
    border-bottom: 1px solid #000000;
    padding: 4px 0;
    margin: 4px 0;
  }

  .thermal-receipt .footer-note {
    font-size: 8pt;
    margin-top: 8px;
    text-align: center;
  }
}
