/* Thermal receipt: black on white only, so it prints the same on any mono printer. */
.receipt {
  width: 72mm; margin: 0 auto; padding: 4mm 3mm 6mm;
  background: #fff; color: #000;
  font-family: var(--font-ui); font-size: 12.5px; line-height: 1.45;
  border-radius: 6px; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  position: relative; overflow: hidden;
}
.receipt.w58 { width: 48mm; font-size: 11px; padding: 3mm 1.5mm 5mm; }
.receipt .r-head { text-align: center; }
.receipt .r-logo { width: 44mm; margin: 0 auto 0.5mm; display: block; }
.receipt.w58 .r-logo { width: 36mm; }
.receipt .r-name { font-family: var(--font-brand); font-weight: 800; font-size: 20px; line-height: 1.2; }
.receipt .r-latin { font-family: var(--font-brand); font-weight: 800; font-size: 10px; letter-spacing: 0.3em; direction: ltr; padding-inline-start: 0.3em; }
.receipt .r-sub, .receipt .r-info { font-size: 11px; }
.receipt .r-title { text-align: center; font-weight: 700; font-size: 14px; margin: 2.5mm 0 1.5mm; padding: 1mm 0; border-top: 1.5px solid #000; border-bottom: 1.5px solid #000; }
.receipt .r-edited { text-align: center; font-size: 11px; font-weight: 600; margin: -1mm 0 1.5mm; }
.receipt .r-rows { display: flex; flex-direction: column; gap: 0.5mm; }
.receipt .r-row { display: flex; justify-content: space-between; gap: 2mm; }
.receipt .r-row span:first-child { white-space: nowrap; }
.receipt .r-row span:last-child { text-align: end; }
.receipt .r-sep { border-top: 1px dashed #000; margin: 2mm 0; }
.receipt .r-items { width: 100%; border-collapse: collapse; }
.receipt .r-items th { font-size: 11px; text-align: start; border-bottom: 1px solid #000; padding-bottom: 1mm; }
/* Prices sit at the row's end in both Arabic and English; the number itself is an LTR span. */
.receipt .r-items th:last-child, .receipt .r-items td:last-child { text-align: end; white-space: nowrap; padding-inline-start: 2mm; }
.receipt .r-items td { padding: 0.8mm 0; vertical-align: top; }
/* The vehicle (or service) heads the list; its wash and add-ons are indented under it. */
.receipt .r-items .r-group td { font-weight: 700; font-size: 13px; padding-top: 1.2mm; }
.receipt .r-items .r-sub td:first-child { padding-inline-start: 3.5mm; }
.receipt .r-total { font-size: 16px; font-weight: 800; border-top: 1.5px solid #000; border-bottom: 1.5px solid #000; padding: 1mm 0; margin: 1mm 0; }
.receipt .r-qr { display: flex; justify-content: center; margin: 2.5mm 0 1mm; }
.receipt .r-qr svg { width: 30mm; height: 30mm; }
/* Several notes can be written one per line in settings. */
.receipt .r-note { text-align: center; font-weight: 700; border: 1.5px solid #000; border-radius: 2mm; padding: 1mm; margin-top: 2mm; white-space: pre-line; }
.receipt .r-thanks { text-align: center; margin-top: 2mm; font-weight: 600; }
.receipt .r-void { position: absolute; top: 40%; inset-inline: -10%; transform: rotate(-18deg); text-align: center; font-size: 30px; font-weight: 800; letter-spacing: 0.1em; border: 3px solid #000; padding: 1mm 0; background: rgba(255, 255, 255, 0.85); }

.receipt-wrap { display: flex; flex-direction: column; align-items: center; gap: var(--space-4); }
.receipt-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; justify-content: center; }

@media print {
  html, body { background: #fff !important; color: #000 !important; }
  body::before { display: none; }
  .sidebar, .topbar, .tabbar, .pos-bar, .no-print, .toasts { display: none !important; }
  .shell { display: block !important; }
  .page { padding: 0 !important; max-width: none !important; }
  .receipt { box-shadow: none; border-radius: 0; margin: 0; }

  /* Reports print on regular paper in a light scheme. */
  .print-light, .print-light * { color: #000 !important; background: #fff !important; box-shadow: none !important; border-color: #999 !important; }
  .print-light .kpis { grid-template-columns: repeat(4, 1fr) !important; }
  .print-light .table-wrap { overflow: visible; }
  .print-light .table { min-width: 0; font-size: 11px; }
  .print-light .card, .print-light .kpi, .print-light .table-wrap { break-inside: avoid; }
}

/* A tip slip printed through the print window: only the slip image is on paper. */
.print-slip { display: none; }
@media print {
  body.printing-slip > *:not(.print-slip) { display: none !important; }
  body.printing-slip .print-slip { display: block; margin: 0 auto; }
}
