/* 80 mm roll, 3 mm margins on each side: 74 mm printable content. */
#receiptDialog{width:min(520px,96vw);max-height:92vh;overflow:auto;background:#eef2f5}#thermalSheet{width:74mm;max-width:100%;margin:16px auto;padding:4mm;background:#fff;color:#000;font:12px/1.4 'Courier New',monospace;overflow-wrap:anywhere;text-align:center}#thermalSheet h2{font:700 16px/1.3 'Courier New',monospace;margin:0 0 8px}#thermalSheet h3{font:700 14px/1.3 'Courier New',monospace;border-top:1px dashed black;border-bottom:1px dashed black;padding:10px 0;margin:12px 0}#thermalSheet p{color:#000;font-size:11px;line-height:1.4;margin:6px 0}.ticketbold{font-weight:bold}.ticketline{display:flex;justify-content:space-between;gap:10px;text-align:left;margin:7px 0}.ticketline strong{white-space:nowrap}.ticketid{font-size:9px!important;text-align:left}.signature{margin-top:24px!important}.receipt-actions{display:flex;gap:10px}.receipt-actions button{flex:1;padding:12px;border:1px solid #bccdd6;border-radius:8px}.thermal-options{border-top:1px solid #e3e9ee;margin-top:16px;padding-top:8px}.thermal-options label{font-size:11px}.thermal-options input[type=checkbox]{display:inline-block;width:auto;min-height:0;margin:0 6px 0 0}.thermal-options select{width:100%;padding:10px;border:1px solid #bccdd6;border-radius:6px;font:11px 'Segoe UI',sans-serif}.reprint{border:0;background:transparent;color:#08777a;padding:7px 0;text-decoration:underline;font-size:11px}
@media print{
 @page{size:auto;margin:3mm}
 body{background:white!important;width:74mm!important;margin:0!important}
 body>*{display:none!important}
 body.thermal-print #receiptDialog{display:block!important;position:static!important;inset:auto!important;border:0!important;margin:0!important;padding:0!important;max-height:none!important;max-width:none!important;width:74mm!important;overflow:visible!important;box-shadow:none!important;background:#fff!important}
 #receiptDialog::backdrop{display:none!important}
 #receiptDialog>*:not(#thermalSheet){display:none!important}
 body.thermal-print #thermalSheet{display:block!important;width:74mm!important;max-width:none!important;margin:0!important;padding:0!important}
 #thermalSheet .ticketline,#thermalSheet h3,#thermalSheet p{break-inside:avoid}
}
/* Compact sale ticket only; closing report retains its full layout. */
#thermalSheet.compact-ticket{font:11px/1.2 'Courier New',monospace;padding:2mm}
#thermalSheet.compact-ticket h2{font:700 12px/1.2 'Courier New',monospace;margin:0 0 3px}
#thermalSheet.compact-ticket p{font-size:11px;line-height:1.2;margin:2px 0}
#thermalSheet.compact-ticket .fiscal-detail{font-size:10px;text-align:left}
#thermalSheet.compact-ticket .ticketline{font-size:11px;margin:3px 0}
#thermalSheet.compact-ticket .ticketline:first-of-type{border-top:1px dashed #000;padding-top:4px;margin-top:4px}
/* Match the approved supermarket-style total in preview and browser printing. */
#thermalSheet.compact-ticket .ticketline:last-child{border-top:1px dashed #000;padding-top:5px;margin:4px 0 0;justify-content:center;align-items:baseline;gap:10px;text-align:center;font-size:26px;line-height:1.05;font-weight:700;break-inside:avoid}
