/* BetaWave Inventory shared tokens, label rendering, print. */
/* Hosted here so visitors' browsers never contact a font service. Latin characters only. */
@font-face {
  font-family: "Big Shoulders Display";
  font-weight: 700 900;
  font-display: swap;
  src: url("../vendor/fonts/big-shoulders-display-v24-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Big Shoulders Stencil Display";
  font-weight: 800 900;
  font-display: swap;
  src: url("../vendor/fonts/big-shoulders-stencil-display-v30-latin.woff2") format("woff2");
}
:root {
  --yellow: #ffd21f;
  --yellow-deep: #f2bd00;
  --yellow-soft: #fff3b8;
  --ink: #111111;
  --ink-2: #3b3b3b;
  --on-yellow-2: #4a3c00;
  --paper: #ffffff;
  --concrete: #e7e8e9;
  --concrete-2: #d4d6d8;
  --line: #c4c7ca;
  --danger: #b3122b;
  --danger-soft: #fde8eb;
  --ok: #17703a;
  --radius: 6px;
  --display: "Big Shoulders Display", "Big Shoulders", "Arial Narrow", sans-serif;
  --stencil: "Big Shoulders Stencil Display", "Big Shoulders Stencil", "Big Shoulders Display", sans-serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--concrete);
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--yellow); color: var(--ink); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; box-shadow: 0 0 0 6px var(--yellow); }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1.5px; }
img, svg { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
.num { font-variant-numeric: tabular-nums; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-thumb { background: var(--concrete-2); border: 3px solid var(--concrete); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 40px; padding: 0 16px;
  border: 2px solid var(--ink); border-radius: var(--radius);
  background: var(--paper); color: var(--ink);
  font-weight: 650; font-size: 15px; text-decoration: none; cursor: pointer;
  transition: background-color 120ms, transform 120ms var(--ease-out);
}
.btn:hover { background: var(--yellow-soft); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--ink); color: var(--yellow); }
.btn-primary:hover { background: #2b2b2b; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: rgba(0, 0, 0, 0.06); }
.btn svg { width: 18px; height: 18px; }

/* ---------- Label (screen + print) ---------- */
.lbl {
  position: relative;
  display: flex; flex-direction: column; gap: 0.02in;
  background: var(--paper); color: #000;
  overflow: hidden;
  font-family: var(--sans);
  line-height: 1.12;
}
.lbl.outline { outline: 0.5pt dashed #9aa0a6; outline-offset: -0.5pt; }
.lbl-row { flex: 0 0 auto; min-width: 0; }
.lbl-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lbl-text.two {
  white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.lbl-code { flex: 1 1 auto; min-height: 0.2in; display: flex; flex-direction: column; }
.lbl-bars { flex: 1 1 auto; min-height: 0; display: block; }
.lbl-bars svg { width: 100%; height: 100%; color: #000; }
.lbl-code.is-qr { flex: 0 0 auto; }
.lbl-qr { display: block; flex: none; }
.lbl-qr svg { width: 100%; height: 100%; color: #000; }
.lbl-hr { flex: 0 0 auto; font-family: var(--mono); font-size: 7pt; letter-spacing: 0.06em; text-align: inherit; }
.lbl-code.is-bad {
  justify-content: center; align-items: center;
  background: repeating-linear-gradient(-45deg, #fff 0 4px, #f3d2d7 4px 8px);
  border: 1px solid var(--danger);
}
.lbl-bad { font: 650 7pt/1.2 var(--sans); color: var(--danger); background: #fff; padding: 1px 4px; text-align: center; }

/* ---------- Print ---------- */
#print-root { display: none; }
@media print {
  body { background: #fff; }
  body > *:not(#print-root) { display: none !important; }
  #print-root { display: block; }
  .page { position: relative; overflow: hidden; break-after: page; page-break-after: always; }
  .page:last-child { break-after: auto; page-break-after: auto; }
  .page .lbl { position: absolute; }
  .lbl-code.is-bad { background: #fff; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
