/* Print page of a business's scan-to-book QR code (templates/pages/booking-qr-print.ftl). Always light and black-on-white: it is meant for paper.
   Sizes are in millimetres via --u (1mm on A4, scaled for A5/A6) so a poster looks the same at every paper size; the page size itself comes from the
   inline @page rule of the template. On screen the sheet is shown scaled down (zoom) so a phone can preview it; printing resets the zoom. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.qrp {
  margin: 0;
  background: #e9e9ee;
  color: #111;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --u: 1mm;
}
body.qrp.qrp-a5 { --u: 0.7048mm; }
body.qrp.qrp-a6 { --u: 0.5mm; }

/* ---- toolbar (screen only) */
.qrp-bar {
  position: sticky; top: 0; z-index: 2;
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem;
  padding: 0.7rem 1rem; background: #fff; border-bottom: 1px solid #d6d6dc;
}
.qrp-back { color: #0d6e5f; text-decoration: none; font-weight: 600; }
.qrp-formats { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-inline: auto; }
.qrp-format {
  padding: 0.35rem 0.8rem; border: 1px solid #c6c6ce; border-radius: 999px; color: #16161a; text-decoration: none; font-size: 0.9rem; background: #fff;
}
.qrp-format.is-current { background: #0d6e5f; border-color: #0d6e5f; color: #fff; }
.qrp-print-btn {
  display: inline-flex; align-items: center; gap: 0.45rem; min-height: 40px; padding: 0.4rem 1.1rem;
  border: 0; border-radius: 10px; background: #0d6e5f; color: #fff; font: inherit; font-weight: 700; cursor: pointer;
}
.qrp-print-btn:hover { background: #0a5a4e; }
.qrp-print-btn .icon { width: 1.15em; height: 1.15em; }
.qrp-tip { max-width: 46rem; margin: 0.8rem auto 0; padding: 0 1rem; color: #4a4a55; font-size: 0.88rem; text-align: center; }

/* ---- the sheet(s) */
.qrp-stage { display: flex; justify-content: center; padding: 1.2rem 0 2.5rem; }
.qrp-sheet {
  background: #fff; color: #000; box-shadow: 0 2px 6px rgb(0 0 0 / 0.12), 0 12px 32px rgb(0 0 0 / 0.14);
  overflow: hidden; flex: none;
}
.qrp-a4 .qrp-sheet, .qrp-cards .qrp-sheet { width: 210mm; height: 297mm; }
.qrp-a5 .qrp-sheet { width: 148mm; height: 210mm; }
.qrp-a6 .qrp-sheet { width: 105mm; height: 148mm; }

/* Poster */
.qrp-poster {
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: calc(var(--u) * 16) calc(var(--u) * 14) calc(var(--u) * 12);
}
.qrp-name { margin: 0; font-size: calc(var(--u) * 8); font-weight: 600; line-height: 1.15; color: #333; overflow-wrap: anywhere; }
.qrp-title { margin: calc(var(--u) * 3) 0 calc(var(--u) * 7); font-size: calc(var(--u) * 15); font-weight: 800; line-height: 1.1; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.qrp-code { width: calc(var(--u) * 118); max-width: 100%; border: calc(var(--u) * 0.6) solid #000; border-radius: calc(var(--u) * 4); padding: calc(var(--u) * 2); }
.qrp-qr { display: block; width: 100%; height: auto; }
.qrp-sub { margin: calc(var(--u) * 7) 0 calc(var(--u) * 2); font-size: calc(var(--u) * 6); color: #333; }
.qrp-link { margin: 0; font-size: calc(var(--u) * 8.5); font-weight: 800; letter-spacing: 0.01em; overflow-wrap: anywhere; }
.qrp-brand { display: flex; align-items: center; gap: calc(var(--u) * 2); margin: auto 0 0; padding-top: calc(var(--u) * 8); font-size: calc(var(--u) * 4.2); color: #555; }
.qrp-brand img { width: calc(var(--u) * 6); height: calc(var(--u) * 6); }

/* Business cards: 2 x 5 on an A4 sheet, 85 x 55 mm each, dashed cutting guides */
.qrp-sheet-cards { display: grid; grid-template-columns: repeat(2, 85mm); grid-template-rows: repeat(5, 55mm); justify-content: center; align-content: center; }
.qrp-card { display: flex; align-items: center; justify-content: space-between; gap: 3mm; padding: 4.5mm; border: 0.2mm dashed #8a8a93; }
.qrp-card-text { min-width: 0; flex: 1; }
.qrp-card-name { margin: 0 0 1.5mm; font-size: 4.4mm; font-weight: 800; line-height: 1.15; overflow-wrap: anywhere; }
.qrp-card-title { margin: 0 0 2mm; font-size: 3.3mm; line-height: 1.2; color: #333; }
.qrp-card-link { margin: 0; font-size: 3mm; font-weight: 700; overflow-wrap: anywhere; }
.qrp-card-code { flex: none; width: 31mm; }
.qrp-card-code .qrp-qr { width: 31mm; height: 31mm; }

/* On screen the paper is shown smaller so it fits a phone / laptop; printing resets this. */
@media screen and (max-width: 900px) {
  .qrp-a4 .qrp-sheet, .qrp-cards .qrp-sheet { zoom: 0.62; }
  .qrp-a5 .qrp-sheet { zoom: 0.85; }
}
@media screen and (max-width: 560px) {
  .qrp-a4 .qrp-sheet, .qrp-cards .qrp-sheet { zoom: 0.44; }
  .qrp-a5 .qrp-sheet { zoom: 0.62; }
  .qrp-a6 .qrp-sheet { zoom: 0.84; }
  .qrp-formats { margin-inline: 0; }
}

/* ---- paper */
@media print {
  html, body.qrp { background: #fff; margin: 0; padding: 0; }
  .no-print { display: none !important; }
  .qrp-stage { display: block; padding: 0; }
  .qrp-sheet { zoom: 1 !important; box-shadow: none; margin: 0; break-after: page; page-break-after: always; }
  .qrp-sheet:last-child { break-after: auto; page-break-after: auto; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Promotion poster / cards (templates/pages/promotion-qr-print.ftl): the offer first - "-30%", the title, the last booking day, the services with the prices and the
   Omnibus line (the lowest price of the 30 days before the reduction), then the code. */
.qrp-promo { padding-top: calc(var(--u) * 12); }
.qrp-pct { margin: calc(var(--u) * 2) 0 0; font-size: calc(var(--u) * 30); font-weight: 900; line-height: 1; letter-spacing: -0.02em; }
.qrp-promo .qrp-title { margin: calc(var(--u) * 2) 0 calc(var(--u) * 2); font-size: calc(var(--u) * 11); }
/* Tag poster: the tag is the headline, the "scan the code" line sits under it. */
.qrp-poster .qrp-title + .qrp-name { margin: calc(var(--u) * -3) 0 calc(var(--u) * 7); }
.qrp-until { margin: 0 0 calc(var(--u) * 5); font-size: calc(var(--u) * 6); font-weight: 700; color: #333; }
.qrp-lines { list-style: none; margin: 0 0 calc(var(--u) * 5); padding: 0; width: 100%; max-width: calc(var(--u) * 150); }
.qrp-lines li { display: grid; grid-template-columns: 1fr auto; gap: 0 calc(var(--u) * 3); padding: calc(var(--u) * 1.6) 0; border-bottom: calc(var(--u) * 0.25) solid #bbb; text-align: start; }
.qrp-line-name { font-size: calc(var(--u) * 5); font-weight: 600; overflow-wrap: anywhere; }
.qrp-line-prices { font-size: calc(var(--u) * 5); white-space: nowrap; }
.qrp-line-prices s { color: #555; margin-inline-end: calc(var(--u) * 1); }
.qrp-omni { grid-column: 1 / -1; font-size: calc(var(--u) * 3.2); color: #444; }
.qrp-promo .qrp-code { width: calc(var(--u) * 84); }
.qrp-promo .qrp-sub { margin-top: calc(var(--u) * 4); }
.qrp-promo .qrp-brand { padding-top: calc(var(--u) * 5); }
.qrp-card-offer { margin: 0 0 1.6mm; font-size: 3.3mm; line-height: 1.2; color: #111; }
.qrp-card-omni { margin: 1.2mm 0 0; font-size: 2.3mm; line-height: 1.2; color: #444; }
