.thermal-receipt {
  box-sizing: border-box;
  inline-size: 100%;
  max-inline-size: 48mm;
  margin-inline: auto;
  padding: 1mm;
  background: white;
  color: black;
  font: 10px/1.3 "Courier New", monospace;
  overflow-wrap: anywhere;
}

.thermal-receipt header, .thermal-center { text-align: center; }
.thermal-receipt .thermal-logo {
  display: block;
  width: 34mm;
  max-width: 100%;
  height: auto;
  margin: 0 auto 1mm;
}
.thermal-receipt header strong, .thermal-total { font-size: 11px; }
.thermal-receipt section { margin-top: 2mm; padding-top: 2mm; border-top: 1px dashed; }
.thermal-receipt .thermal-cashier { margin-top: 4mm; }
.thermal-signature { margin-top: 7mm; border-top: 1px solid; text-align: center; }
.thermal-receipt + .thermal-receipt { margin-top: 8mm; border-top: 1px dashed #9aa; }
.thermal-preview-actions { margin: 0 0 6px; flex-wrap: wrap; }
.thermal-preview-note { margin: 0; }
#thermal-print-area { display: none; }

@page thermal-receipt { size: auto; margin: 0; }

@media print {
  html:has(body.is-printing-thermal) {
    height: auto !important;
    background: white !important;
    overflow: visible !important;
  }

  body.is-printing-thermal {
    display: block !important;
    min-width: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    background: white !important;
    overflow: visible !important;
  }

  body.is-printing-thermal > :not(#thermal-print-area),
  body.is-printing-thermal dialog::backdrop { display: none !important; }

  body.is-printing-thermal > #thermal-print-area {
    page: thermal-receipt;
    display: block !important;
    inline-size: 100%;
    max-inline-size: 58mm;
    visibility: visible !important;
  }

  /* hummer.css esconde todos os descendentes da página ao imprimir QR codes. */
  body.is-printing-thermal > #thermal-print-area,
  body.is-printing-thermal > #thermal-print-area * {
    visibility: visible !important;
  }
}
