/* ══════════════════════════════════════════════════════════════════
   NEXUSSTOCK 360 - THERMAL RECEIPT & INVOICE PRINT CSS
   ══════════════════════════════════════════════════════════════════ */

.receipt-view-wrapper {
  background: #ffffff;
  color: #000000;
  width: 80mm;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0 auto;
  padding: 12px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px;
  line-height: 1.3;
  border: 1px dashed #ccc;
  box-shadow: var(--shadow-md);
  border-radius: 4px;
}

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

.receipt-brand {
  font-size: 16px;
  font-weight: bold;
}

.receipt-company {
  font-size: 13px;
  font-weight: bold;
  margin-top: 2px;
}

.receipt-rif {
  font-size: 11px;
}

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

.receipt-table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0;
  font-size: 11px;
}

.receipt-table th {
  border-bottom: 1px dashed #000;
  padding: 4px 0;
  text-align: left;
}

.receipt-table td {
  padding: 3px 0;
  vertical-align: top;
}

.receipt-totals {
  border-top: 1px dashed #000;
  padding-top: 6px;
  margin-top: 6px;
}

.receipt-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 2px;
}

.receipt-total-grand {
  font-size: 14px;
  font-weight: bold;
  border-top: 1px solid #000;
  border-bottom: 1px solid #000;
  padding: 4px 0;
  margin-top: 4px;
}

.receipt-footer {
  text-align: center;
  margin-top: 12px;
  font-size: 10px;
  border-top: 1px dashed #000;
  padding-top: 8px;
}

@media print {
  @page {
    size: 80mm auto;
    margin: 0;
  }

  html,
  body {
    width: 80mm;
    min-width: 80mm;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
  }

  body * {
    visibility: hidden;
  }

  .receipt-view-wrapper, .receipt-view-wrapper * {
    visibility: visible;
  }

  #modal-receipt {
    position: absolute !important;
    inset: 0 auto auto 0 !important;
    display: block !important;
    width: 80mm !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #ffffff !important;
    opacity: 1 !important;
    overflow: visible !important;
    backdrop-filter: none !important;
  }

  #modal-receipt .modal-dialog {
    display: block !important;
    width: 80mm !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    overflow: visible !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transform: none !important;
  }

  #modal-receipt .modal-header,
  #modal-receipt .modal-footer {
    display: none !important;
  }

  #modal-receipt .modal-body {
    display: block !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 0 !important;
    background: #ffffff !important;
  }

  .receipt-view-wrapper {
    position: static;
    left: 0;
    top: 0;
    width: 80mm !important;
    max-width: none;
    min-height: 0;
    border: none;
    box-shadow: none;
    padding: 4mm !important;
    margin: 0;
    font-size: 11px;
    line-height: 1.25;
    box-sizing: border-box;
  }

  .receipt-table {
    page-break-inside: auto;
    break-inside: auto;
  }

  .receipt-table thead {
    display: table-header-group;
  }

  .receipt-table tr,
  .receipt-totals,
  .receipt-footer {
    page-break-inside: avoid;
    break-inside: avoid;
  }
}
