/* printsheet.io — QR code generator page styles */

/* Make the extra input types match the shared control styling. */
.controls .field input[type="url"],
.controls .field input[type="email"],
.controls .field input[type="tel"],
.controls .field textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--border);
  border-radius: 7px; font-size: .95rem; background: #fff; color: var(--ink);
  font-family: inherit;
}
.controls .field textarea { resize: vertical; min-height: 56px; }
.controls .field input[type="range"] { width: 100%; }

.controls .field .muted { font-weight: 400; color: var(--muted); font-size: .78rem; }
.controls .hint { font-size: .78rem; color: var(--muted); margin-top: 4px; }
.controls .btn.tiny { padding: 4px 10px; font-size: .8rem; margin-top: 6px; }
.controls .inline { display: flex; gap: 8px; }
.controls .inline input[type="number"] { flex: 2; }
.controls .inline select { flex: 1; }
.controls hr.sep { border: none; border-top: 1px solid var(--border); margin: 16px 0; }

.qpanel { margin-bottom: 4px; }

/* Segmented button grids (printed size, error correction).
   Buttons reuse the shared .seg-btn styling (solid accent fill + white text
   when .sel), so only the grid layout + the ECC two-line label live here. */
.btn-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.btn-grid .seg-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1px; min-height: 42px; line-height: 1.15;
}
.ecc-grid .seg-btn b { font-size: .98rem; }
.ecc-grid .seg-btn span { font-weight: 400; font-size: .72rem; color: var(--muted); }
/* When an ECC button is selected the whole button is accent-blue, so make the
   sub-percentage legible against it. */
.ecc-grid .seg-btn.sel span { color: #fff; }

/* Dimmed background-colour field when transparent is on */
.field.disabled { opacity: .45; pointer-events: none; }

/* QR-codes-per-page stepper */
.count-stepper { display: flex; align-items: stretch; gap: 8px; }
.count-stepper .step-btn {
  width: 44px; min-height: 44px; font-size: 1.3rem; line-height: 1;
  display: flex; align-items: center; justify-content: center; padding: 0;
}
.count-stepper .step-btn:disabled { opacity: .4; cursor: default; }
.count-stepper .count-val {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; border: 1px solid var(--border); border-radius: 7px;
  background: #fff; min-height: 44px; line-height: 1.1;
}
.count-stepper .count-val b { font-size: 1.15rem; }
.count-stepper .count-val span { font-size: .72rem; color: var(--muted); }

/* Corner-style buttons: 3 across. */
.style-grid { grid-template-columns: repeat(3, 1fr); }
.style-grid .seg-btn { min-height: 38px; }

/* Caption text-size buttons: 4 across (S/M/L/XL). */
.cap-grid .seg-btn { min-height: 38px; }

/* Live on-screen preview stage. The preview is a TRUE-SCALE miniature of the
   printed page: the white sheet keeps the paper's proportions and the QR sits
   on it at its real physical fraction, so it matches the print exactly. */
.qr-stage {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 24px; border-radius: var(--radius);
  background: #e9edf2;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.qr-live {
  display: flex; justify-content: center; align-items: flex-start;
  width: 100%;
}
.qr-live .qr-sheet {
  display: block; background: #fff;
  width: auto; height: auto;
  max-width: 100%; max-height: 460px;
  aspect-ratio: var(--paper-ar, 0.707);
  box-shadow: 0 2px 10px rgba(0,0,0,.18); border-radius: 2px;
}
.qr-live .qr-empty {
  width: 240px; max-width: 100%; aspect-ratio: 0.707; display: flex;
  align-items: center; justify-content: center; text-align: center;
  padding: 24px; color: var(--muted); background: #fff; border-radius: 2px;
  border: 1px dashed var(--border); box-sizing: border-box;
  box-shadow: 0 2px 10px rgba(0,0,0,.12);
}

/* The exact-mm print sheet is hidden on screen; print.js reveals it. */
.qr-printwrap { position: absolute; left: -99999px; top: 0; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 640px) {
  .qr-live, .qr-live .qr-empty, .qr-caption { width: 260px; }
}
