/* Shared label setup and physical print preview. Label artwork uses the existing print rules. */
.afPrintHelp { font: 12px/1.55 var(--sans); color: var(--muted); margin: 8px 0 12px; }
.afPrintSetup { max-width: 620px; max-height: calc(100dvh - 32px); overflow: auto; }
.afPrintFields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.afPrintFields .field { min-width: 0; margin-bottom: 0; }
.afPrintFields select, .afPrintFields input { font-family: var(--sans); }
.afPrintFields [hidden] { display: none; }
.afPrintError { color: var(--bad); font: 12px/1.5 var(--sans); margin-top: 10px; }
.afPrintDevice { display: grid; justify-items: center; gap: 4px; max-width: 130px; margin-left: auto; color: var(--muted); font: 11px/1.4 var(--sans); text-transform: none; letter-spacing: normal; text-align: center; }
.afPrintDevice svg { color: var(--copper-dark); }
#label-view .label-toolbar, #queue-print-view .label-toolbar { max-width: 1000px; flex-wrap: wrap; justify-content: flex-start; gap: 8px; }
.afPrintNotice { max-width: 1000px; margin: 0 auto 16px; }
.afPrintNotice select { width: auto; max-width: 100%; font-family: var(--sans); }
.afPrintStatus { font: 12px/1.5 var(--sans); color: var(--copper-dark); margin-top: 8px; }
.afPrintFrame { position: relative; margin: 0 auto 24px; max-width: 100%; }
.afPrintPage { position: absolute; top: 0; left: 0; width: var(--page-w); height: var(--page-h); background: white; color: black; box-shadow: 0 0 0 1px var(--hairline); transform: scale(var(--preview-scale, 1)); transform-origin: top left; overflow: hidden; }
.afPrintSlot { position: relative; width: var(--slot-w); height: var(--slot-h); }
.afPrintArtwork { position: absolute; left: 0; top: 0; width: var(--native-w); height: var(--native-h); display: flex; align-items: center; justify-content: center; }
.afPrintSlot.isPortrait .afPrintArtwork { transform: translateY(var(--native-w)) rotate(-90deg); transform-origin: top left; }
.afPrintArtwork .label-card { flex-shrink: 0; width: var(--native-w); margin: 0; zoom: var(--label-scale, 1); }
.afPrintPage.isSheet { display: grid; justify-content: space-evenly; align-content: space-evenly; }
.afPrintPage:not(.isSheet) { display: grid; place-items: center; }
@media (max-width: 600px) {
  .afPrintFields { grid-template-columns: minmax(0, 1fr); }
  #label-view, #queue-print-view { padding: 16px !important; }
  .afPrintSetup .af-dialog-actions { flex-wrap: wrap; }
}
@media print {
  .afPrintSetup, .afPrintNotice, #queue-print-toolbar, #single-print-toolbar { display: none !important; }
  body:has(.afPrintFrame) header, body:has(.afPrintFrame) #workspace-main { display: none !important; }
  #label-view, #queue-print-view { padding: 0 !important; }
  .afPrintFrame { display: contents; }
  .afPrintPage { position: relative; transform: none; margin: 0; box-shadow: none; break-after: page; break-inside: avoid; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .afPrintFrame:last-child .afPrintPage { break-after: auto; }
}
