/* One receipt layout, used on the customer's bill page, in the in-app share
   sheet, and on paper. Widths follow real thermal rolls (58mm and 80mm); the
   printer driver owns the page length, so only the width is fixed here. */
.receipt {
  font-family: Arial, Helvetica, sans-serif;
  color: #16202b;
  background: #fff;
  font-weight: 600;
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
  padding: 22px 20px;
}
.receipt h1 {
  font-size: 1.25rem;
  margin: 0;
  text-align: center;
  letter-spacing: -0.3px;
}
.receipt .r-meta {
  text-align: center;
  color: #51606e;
  font-size: 0.8125rem;
  margin: 4px 0 14px;
}
.receipt .r-lines {
  border-top: 1px dashed #97a2ae;
  border-bottom: 1px dashed #97a2ae;
  padding: 8px 0;
}
.receipt .r-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
  font-size: 0.9375rem;
}
.receipt .r-line small {
  display: block;
  color: #51606e;
  font-weight: 600;
  font-size: 0.75rem;
}
.receipt .r-line strong {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.receipt .r-sum {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 0.875rem;
  color: #51606e;
  font-variant-numeric: tabular-nums;
}
.receipt .r-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 0 2px;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  font-variant-numeric: tabular-nums;
}
.receipt .r-state {
  text-align: center;
  font-size: 0.8125rem;
  margin-top: 8px;
  color: #0f5691;
}
.receipt .r-state.credit {
  color: #8a6300;
}
.receipt .r-qr {
  display: grid;
  place-items: center;
  margin: 14px auto 4px;
  width: 150px;
}
.receipt .r-qr svg {
  width: 100%;
  height: auto;
  display: block;
}
.receipt .r-foot {
  text-align: center;
  font-size: 0.75rem;
  color: #51606e;
  margin-top: 10px;
}
#print-root {
  display: none;
}
@media print {
  @page {
    margin: 0;
  }
  html,
  body {
    background: #fff !important;
    margin: 0 !important;
  }
  body > *:not(#print-root) {
    display: none !important;
  }
  #print-root {
    display: block;
  }
  #print-root .receipt {
    max-width: none;
    margin: 0;
    padding: 3mm 3mm 8mm;
  }
  #print-root.paper-58 .receipt {
    width: 58mm;
    font-size: 11px;
  }
  #print-root.paper-80 .receipt {
    width: 80mm;
    font-size: 12px;
  }
  #print-root.paper-a4 .receipt {
    width: 120mm;
    margin: 15mm auto;
  }
  .receipt .r-line,
  .receipt .r-sum {
    font-size: 1em;
  }
  .receipt .r-total {
    font-size: 1.6em;
  }
  .no-print {
    display: none !important;
  }
}
