/* Model QR codes (2026-10-20) — see js/model-qr.js.
   Dialog pieces reuse .vv-dialog-overlay / .vv-dialog-card from css/vv-dialogs.css and read
   the page tokens, so they follow the theme and text size. Nothing here sets a color except the
   print sheet, which is black on white on purpose. */

.qr-sheet-row { margin: 0 0 8px; }
.vv-qr-card { width: min(520px, 100%); }
.vv-qr-big {
  width: min(320px, 70vw); aspect-ratio: 1 / 1; margin: 4px auto; background: #fff;
  border-radius: 8px; overflow: hidden;
}
.vv-qr-link {
  margin: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: calc(11px * var(--vv-text-scale, 1)); word-break: break-all; opacity: .8; text-align: center;
}
.vv-qr-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vv-qr-count { font-size: calc(12px * var(--vv-text-scale, 1)); opacity: .8; }
.vv-qr-list {
  max-height: min(46vh, 360px); overflow: auto; padding: 6px 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
}
.vv-qr-row {
  display: flex; align-items: center; gap: 8px; padding: 5px 2px; cursor: pointer;
  font-size: calc(13px * var(--vv-text-scale, 1));
}
.vv-qr-row input { flex: 0 0 auto; width: 18px; height: 18px; }
.vv-qr-skipped { font-size: calc(12px * var(--vv-text-scale, 1)); opacity: .8; }

/* The printable copy lives in the page only while the print dialog is open. */
.vv-qrsheet-print { display: none; }

@media print {
  @page { margin: 12mm; }      /* no size: the printer's own paper (Letter or A4) is used */
  html, body { background: #fff !important; overflow: visible !important; height: auto !important; }
  body > *:not(.vv-qrsheet-print) { display: none !important; }
  .vv-qrsheet-print { display: block !important; color: #000; font: 12pt/1.3 system-ui, -apple-system, sans-serif; }
  .vv-qrsheet-title { margin: 0 0 6mm; font-size: 16pt; }
  .vv-qrsheet-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8mm 6mm; }
  .vv-qrsheet-cell { margin: 0; text-align: center; break-inside: avoid; page-break-inside: avoid; }
  .vv-qrsheet-code { width: 100%; max-width: 52mm; aspect-ratio: 1 / 1; margin: 0 auto; }
  .vv-qrsheet-name { margin-top: 2mm; font-size: 10pt; font-weight: 600; overflow-wrap: anywhere; }
  .vv-qrsheet-foot { margin: 8mm 0 0; font-size: 9pt; color: #333; }
}

#model-detail-qr { margin-left: auto; flex: 0 0 auto; }
