/* ============================================================
   Product label sheet — print-only A4 page.
   Inlined into resources/views/admin/products/labels/sheet.blade.php
   (the per-layout grid dimensions are injected there). Mirrors the
   receipt page's standalone, self-styled approach.
   ============================================================ */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #f3f4f6;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: #111;
}

/* On-screen toolbar — hidden when printing. */
.label-toolbar {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
}
.label-tool-btn {
  appearance: none;
  border: 1px solid #d1d5db;
  background: #fff;
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #111;
  text-decoration: none;
  cursor: pointer;
}
.label-tool-btn-primary { background: #111; color: #fff; border-color: #111; }
.label-tool-spacer { flex: 1; }
.label-tool-count { font-size: 12.5px; color: #6b7280; }

/* Each .label-page is one printed sheet. */
.label-page {
  width: 210mm;
  min-height: 297mm;
  margin: 16px auto;
  background: #fff;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.12);
}
.label-page:last-child { break-after: auto; }

.label-grid {
  display: grid;
  justify-content: start;
}

/* One label cell. Inner content is centred; overflow clipped so a long
   name can't blow out the grid. */
.label-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1mm;
  padding: 1.5mm 2mm;
  overflow: hidden;
  text-align: center;
}
.label-name {
  font-size: 8.5pt;
  font-weight: 600;
  line-height: 1.15;
  max-height: 2.4em;
  overflow: hidden;
}
.label-sku   { font-size: 7pt; color: #374151; font-family: 'JetBrains Mono', ui-monospace, monospace; }
.label-price { font-size: 11pt; font-weight: 700; }
.label-barcode { width: 100%; }
.label-barcode svg { display: block; width: 100%; height: auto; max-height: 12mm; }

@media print {
  html, body { background: #fff; }
  .label-toolbar { display: none; }
  .label-page {
    margin: 0;
    box-shadow: none;
    break-after: page;
  }
  .label-page:last-child { break-after: auto; }
}
