/* Tag / label rendering. All sizes in inches so print matches paper. */
.page { position:relative; background:#fff; overflow:hidden; }
.slot { position:absolute; overflow:hidden; }
.slot.outline { outline:0.006in solid #888; outline-offset:-0.003in; }
.slot.outline.cut { outline-style:dashed; }
.slot.round { border-radius:50%; }
.cellbox { position:absolute; overflow:hidden; }
.rotbox { position:absolute; left:0; top:0; transform-origin:0 0; }
.testcell { position:absolute; inset:0; font:bold 10pt Arial, sans-serif; display:flex; align-items:center; justify-content:center; }
.testv { position:absolute; left:50%; top:0; bottom:0; border-left:0.005in solid #999; }
.testh { position:absolute; top:50%; left:0; right:0; border-top:0.005in solid #999; }
.ruler { position:absolute; left:3.75in; width:1in; height:1in; border:0.01in solid #d00; font:7pt Arial, sans-serif; color:#d00; display:flex; align-items:center; justify-content:center; background:rgba(255,255,255,.85); }
.testnote { position:absolute; left:0.6in; bottom:0.15in; font:8pt Arial, sans-serif; }
.tag { position:absolute; inset:0; font-family:Arial, "Helvetica Neue", Helvetica, "Liberation Sans", sans-serif; color:#000; overflow:hidden; line-height:1.1; }
/* shelf tag */
.tag .in { position:absolute; left:var(--pad); top:var(--pad); }
.tag.shelf .in { display:grid; grid-template-columns:1fr auto; grid-template-rows:auto 1fr auto; column-gap:0.05in; }
.tag.shelf .name { grid-column:1 / 3; font-weight:700; font-size:var(--fName); line-height:1.08; max-height:calc(var(--fName) * 2.2); overflow:hidden; text-transform:uppercase; }
.tag.shelf .left { grid-column:1; grid-row:2; display:flex; flex-direction:column; justify-content:flex-end; gap:0.02in; min-width:0; }
.tag.shelf .size { font-size:var(--fSmall); }
.tag.shelf .unit { font-size:var(--fSmall); background:var(--unit); padding:0.015in 0.04in; align-self:flex-start; line-height:1.15; border:0.008in solid #000; }
.tag.shelf .unit b { font-size:1.15em; }
.tag.shelf .unit .lbl { display:block; font-size:.72em; text-transform:uppercase; letter-spacing:.02em; }
.tag.shelf .price { grid-column:2; grid-row:2 / 4; text-align:right; display:flex; flex-direction:column; justify-content:center; align-items:flex-end; line-height:.9; }
.tag.shelf .price .big { font-weight:800; font-size:var(--fPrice); white-space:nowrap; letter-spacing:-0.02em; }
.tag .big sup, .tag .big .cur { font-size:.5em; vertical-align:top; position:relative; top:.08em; }
.tag.shelf .price .multi { font-size:.55em; vertical-align:top; position:relative; top:.08em; margin-right:.03em; }
.tag.shelf .price .was { font-size:var(--fSmall); margin-bottom:0.03in; }
.tag s { text-decoration-thickness:0.012in; }
.tag.shelf .sale-badge { background:var(--accent); color:#fff; font-weight:800; font-size:var(--fSmall); padding:0.01in 0.05in; margin-bottom:0.02in; letter-spacing:.04em; }
.tag.shelf .bottom { grid-column:1; grid-row:3; display:flex; align-items:flex-end; gap:0.05in; min-width:0; }
.tag .bc { flex:none; } .tag.shelf .bc { height:var(--bcH); width:var(--bcW); }
.tag .bc svg { width:100%; height:100%; display:block; }
.tag.shelf .note { font-size:var(--fTiny); line-height:1.1; color:#333; overflow:hidden; overflow-wrap:anywhere; min-width:0; max-height:2.25em; }
.tag.shelf.sale .price .big { color:var(--accent); }
.tag.style-bold .price .big { font-size:calc(var(--fPrice) * 1.12); }
.tag.style-mono { --unit:#fff; --accent:#000; }
.tag.style-mono .sale-badge { background:#000; }
.tag.compact .left .size, .tag.compact .bottom { display:none; }
/* sale tag / sign */
.tag.stag .in { display:flex; flex-direction:column; align-items:center; text-align:center; gap:calc(var(--fSmall) * .35); }
.stag .head { width:100%; background:var(--accent); color:#fff; font-weight:900; font-size:var(--fHead); line-height:1.05; padding:.04em .1em; letter-spacing:.03em; white-space:nowrap; overflow:hidden; flex:none; text-transform:uppercase; }
.stag .name { font-weight:700; font-size:var(--fName); line-height:1.1; text-transform:uppercase; max-height:calc(var(--fName) * 2.3); overflow:hidden; flex:none; width:100%; }
.stag .deal { flex:1 1 auto; min-height:0; width:100%; display:flex; align-items:center; justify-content:center; overflow:hidden; }
.stag .big { font-weight:900; font-size:var(--fPrice); white-space:nowrap; line-height:.95; letter-spacing:-0.03em; color:var(--accent); }
.stag .big .q { font-size:.8em; } .stag .big .for { font-size:.3em; vertical-align:middle; margin:0 .12em; letter-spacing:0; }
.stag .big .off { font-size:.38em; margin-left:.08em; letter-spacing:0; }
.stag .words { font-weight:900; font-size:calc(var(--fPrice) * .42); line-height:1.02; color:var(--accent); text-transform:uppercase; }
.stag .sub { font-size:var(--fSmall); font-weight:700; flex:none; white-space:nowrap; overflow:hidden; max-width:100%; }
.stag .sub .wasbig { font-size:1.25em; }
.stag .unitline { font-size:calc(var(--fSmall) * .9); flex:none; white-space:nowrap; }
.stag .unitline b { background:var(--unit); padding:0 .25em; border:0.008in solid #000; }
.stag .fine { font-size:var(--fTiny); flex:none; white-space:nowrap; overflow:hidden; max-width:100%; color:#222; }
.stag.st-yellow { background:var(--unit); } .stag.st-yellow .big { color:#000; } .stag.st-yellow .unitline b { background:#fff; }
.stag.st-mono { --accent:#000; --unit:#fff; }
/* barcode label */
.tag.bcell .in { display:flex; flex-direction:column; align-items:center; justify-content:center; }
.bcell .cap { font-weight:700; line-height:1.2; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:100%; flex:none; }
.bcell .toosmall { font:8pt Arial, sans-serif; color:#900; position:absolute; inset:0; display:flex; align-items:center; justify-content:center; }
/* print */
#printRoot { display:none; }
@media screen { #printRoot { display:block; position:absolute; left:-30000px; top:0; } }
@media print {
  @page { size:8.5in 11in; margin:0; }
  html, body { margin:0 !important; padding:0 !important; background:#fff !important; }
  body.tool > *:not(#printRoot) { display:none !important; }
  #printRoot { display:block; position:static; }
  #printRoot .page { width:8.5in; height:11in; page-break-after:always; break-after:page; }
  #printRoot .page:last-child { page-break-after:auto; break-after:auto; }
  * { -webkit-print-color-adjust:exact; print-color-adjust:exact; }
}
