/* Receipt packet, on screen and in print. Sizes are in physical units so the
   screen shows what the page will look like. */

.packet {
  background: #fff;
  color: #000;
  padding: 0.25in;
  border-radius: 10px;
  font: 10pt/1.25 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow-x: auto;
}
.packet-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 8px 0; }

.packet-header h1 { font-size: 14pt; margin: 0; }
.packet-header p { font-size: 9.5pt; margin: 2px 0 0; white-space: pre-wrap; }

.packet-summary { width: auto; margin: 0.1in 0; font-size: 9pt; }
.packet-summary th, .packet-summary td { padding: 1px 8px 1px 0; }
.packet-summary td:nth-child(2), .packet-summary td:nth-child(3) { text-align: right; font-variant-numeric: tabular-nums; }
.packet-summary .ok { color: #2f6b3a; }
.packet-summary .bad, .packet-heading-total.bad { color: #9c0006; font-weight: 700; }

.packet-category { margin-top: 0.15in; }
.packet-category h2 { display: flex; justify-content: space-between; align-items: baseline; gap: 0.2in; font-size: 11pt; margin: 0 0 0.06in; padding-bottom: 1px; border-bottom: 1.5px solid #000; break-after: avoid; }
.packet-heading-total { font-size: 9pt; font-weight: 600; font-variant-numeric: tabular-nums; }

.packet-grid { display: flex; flex-wrap: wrap; gap: 0.1in; align-items: flex-start; }
.packet-entry { border: 1px solid #bbb; padding: 0.05in; break-inside: avoid; max-width: 100%; box-sizing: border-box; }
.packet-summary-total td { font-weight: 700; border-top: 1.5px solid #000; }
.packet-entry-head { display: flex; justify-content: space-between; gap: 0.12in; font-size: 9pt; font-weight: 600; }
.packet-amount { font-variant-numeric: tabular-nums; }
.packet-note { font-size: 8.5pt; margin: 1px 0 0; }
.packet-images { display: flex; flex-wrap: wrap; gap: 0.06in; margin-top: 0.04in; align-items: flex-start; }
.packet-figure { margin: 0; }
.packet-figure img { display: block; height: auto; max-width: none; }
.packet-controls { display: flex; gap: 4px; align-items: center; margin-top: 3px; font-size: 12px; }
.packet-controls button { min-height: 32px; padding: 2px 8px; font-size: 12px; }

@media print {
  @page { size: letter; margin: 0.5in; }
  body { background: #fff; padding: 0; }
  body.packet-mode .topbar,
  body.packet-mode nav.tabs,
  body.packet-mode .banner,
  .no-print,
  .toast { display: none !important; }
  main { max-width: none; padding: 0; }
  .packet { padding: 0; border-radius: 0; overflow: visible; }
}
