/* F5 public QR: a table-tent sheet. On paper only the sheet prints, at A6. */
@layer components {
  /* A branch's page: its QR, small, beside its status and the way to print it. */
  .branch-qr {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: var(--block-space) calc(var(--inline-space) * 4);
    padding-block: var(--block-space-double) 0;
    border-block-start: 1px solid var(--color-border); /* the page's hr closes it below */

    & h2 { font-size: var(--text-large); }
    & p { margin: 0; color: var(--color-subtle); }
  }

  .branch-qr__code {
    inline-size: clamp(6rem, 4rem + 6vw, 9rem);
    padding: var(--block-space-half);
    color: #1b1828; /* the code sits on white in either mode, like the printed one */
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    rotate: -3deg;

    & svg { display: block; inline-size: 100%; block-size: auto; }
  }

  .qr-sheet {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--block-space-half);
    max-inline-size: 22rem;
    margin: 0;
    padding: var(--block-space-double);
    text-align: center;
    color: #1b1828; /* paper is white in either mode */
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-large);

    & p { margin: 0; }
  }

  .qr-sheet__business { font-size: var(--text-large); font-weight: 700; }

  .qr-sheet__call { font-weight: 600; }

  .qr-sheet__code { inline-size: 100%; & svg { display: block; inline-size: 100%; block-size: auto; } }
}

@media print {
  @page { size: A6; margin: 8mm; }

  .sidebar, .flash, .no-print { display: none !important; }
  body, main { display: block; padding: 0; background: #fff; }
  .qr-sheet { max-inline-size: none; border: 0; padding: 0; }
}
