/* Free QR warranty label tool: form, A4 preview of 60 x 30 mm labels, print at exact mm sizes. */
.qrl-privacy { display: flex; gap: 0.6rem; align-items: flex-start; background: var(--success-subtle); color: var(--on-success-subtle); border: 1px solid #b9dcc4; border-radius: var(--radius-card); padding: 0.9rem 1.1rem; margin: 0 0 1rem; }
.qrl-privacy p, .notice.qrl-standalone p { margin: 0; }
.qrl-privacy svg, .notice svg { flex: none; width: 20px; height: 20px; margin-top: 0.15rem; }

.qrl-form label, .qrl-legend { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 0.25rem; }
.qrl-form input[type="text"], .qrl-form textarea { width: 100%; min-height: 44px; padding: 0.55rem 0.7rem; font: inherit; color: var(--fg); background: var(--surface); border: 1px solid var(--control-border); border-radius: var(--radius-control); }
.qrl-form textarea { min-height: 9rem; font-family: var(--mono); font-size: 0.88rem; line-height: 1.5; }
.qrl-form input.mono { font-family: var(--mono); }
.qrl-form input[aria-invalid="true"] { border-color: #b42318; box-shadow: 0 0 0 1px #b42318; }
.qrl-err { color: #b42318; font-size: 0.85rem; margin: 0.25rem 0 0; }
.qrl-err::before { content: "! "; font-weight: 700; }
.qrl-hint { font-size: 0.85rem; color: var(--fg-muted); margin: 0.25rem 0 0; }

.qrl-top { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); align-items: end; margin-bottom: 1.25rem; }
.qrl-check { display: flex; align-items: center; gap: 0.5rem; min-height: 44px; font-weight: 500; }
.qrl-check input { width: 20px; height: 20px; accent-color: var(--petrol); }

.qrl-row { position: relative; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); margin: 0 0 0.75rem; padding: 0.75rem 3.5rem 0.9rem 1rem; min-width: 0; }
.qrl-row legend { font-weight: 650; font-size: 0.9rem; padding: 0 0.35rem; }
.qrl-fields { display: grid; gap: 0.75rem; grid-template-columns: minmax(0, 1fr); }
.qrl-remove { position: absolute; top: 0.6rem; right: 0.6rem; width: 44px; height: 44px; border-radius: var(--radius-control); border: 1px solid var(--control-border); background: var(--surface); color: var(--fg); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.qrl-remove:hover { background: var(--surface-2); }
.qrl-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin: 0.5rem 0 1.5rem; }
.qrl-actions button, .qrl-csv button, .qrl-print-row button { font: inherit; cursor: pointer; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

.qrl-csv { border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); padding: 0.25rem 1rem; margin-bottom: 1.5rem; }
.qrl-csv summary { min-height: 44px; display: flex; align-items: center; font-weight: 600; cursor: pointer; }
.qrl-csv pre { font-family: var(--mono); font-size: 0.82rem; background: var(--surface-2); padding: 0.6rem 0.8rem; border-radius: var(--radius-control); overflow-x: auto; }

.qrl-summary { border: 2px solid #b42318; border-radius: var(--radius-card); background: #fef3f2; color: #7a271a; padding: 0.9rem 1.1rem; margin: 0 0 1.5rem; }
.qrl-summary:focus { outline: 3px solid var(--petrol); outline-offset: 2px; }
.qrl-summary-head { font-weight: 650; margin: 0 0 0.35rem; }
.qrl-summary ul { margin: 0; padding-left: 1.2rem; }
.qrl-summary a { color: #7a271a; }

.qrl-print-row { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; align-items: center; margin: 0 0 1rem; }
.qrl-sheet-scroll { overflow-x: auto; padding: 0.5rem 0 1rem; }

/* The sheet: A4 at real size, 3 columns x 60 mm, rows of 30 mm. 9 rows fit; a batch is at most 20. */
.qrl-sheet { width: 210mm; min-height: 297mm; padding: 13.5mm 15mm; margin: 0 auto; background: #fff; color: #000; box-shadow: var(--e3); display: grid; grid-template-columns: repeat(3, 60mm); grid-auto-rows: 30mm; align-content: start; }
.qrl-empty { grid-column: 1 / -1; color: var(--fg-muted); font-size: 0.95rem; padding: 2mm; }
.qrl-label { width: 60mm; height: 30mm; padding: 2mm; display: flex; gap: 1.5mm; align-items: center; overflow: hidden; font-family: var(--sans); line-height: 1.2; break-inside: avoid; }
.qrl-cutlines .qrl-label { outline: 0.1mm dashed #9aa3ab; outline-offset: -0.05mm; }
.qrl-qr { flex: none; width: 26mm; height: 26mm; display: block; }
.qrl-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.7mm; }
.qrl-text p { margin: 0; }
.qrl-company { font-size: 5.5pt; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; color: #333; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qrl-product { font-size: 7.5pt; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.qrl-serial { font-family: var(--mono); font-size: 6.5pt; word-break: break-all; }
.qrl-warranty { font-size: 7pt; font-weight: 600; }

@media (min-width: 48em) {
  .qrl-top { grid-template-columns: minmax(0, 22rem) auto; }
  .qrl-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 64em) {
  .qrl-fields { grid-template-columns: 1.2fr 1fr 0.9fr 1.4fr; }
}

@page { size: A4 portrait; margin: 0; }
@media print {
  html, body { background: #fff !important; margin: 0 !important; padding: 0 !important; }
  body > :not(main), main > :not(#qrl-preview), #qrl-preview .wrap > :not(.qrl-sheet-scroll) { display: none !important; }
  main, #qrl-preview, #qrl-preview .wrap, .qrl-sheet-scroll { margin: 0 !important; padding: 0 !important; border: 0 !important; max-width: none !important; width: auto !important; overflow: visible !important; background: #fff !important; }
  .qrl-sheet { box-shadow: none; margin: 0; height: 297mm; min-height: 0; overflow: hidden; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .qrl-empty { display: none; }
}
