/* Scan a card (pages/scan.js): the scanner window and the Counter's page.
   Every rule starts .stp-scan-. Colours from the studio's variables only. */
.stp-scan-icon { width: 22px; height: 22px; flex: 0 0 auto; }
.stp-scan-flow { display: grid; gap: 14px; justify-items: stretch; text-align: center; }
.stp-scan-flow .st-q { text-align: left; }
.stp-scan-centre { text-align: center; }
.stp-scan-full { width: 100%; }
.stp-scan-full .stp-scan-icon, .stp-scan-pair .stp-scan-icon { margin-right: 10px; }
.stp-scan-huge { min-height: 72px; font-size: 22px; border-radius: 18px; }

.stp-scan-camera { position: relative; width: 100%; max-width: 420px; aspect-ratio: 1; max-height: 52vh; margin: 0 auto; border-radius: 22px; overflow: hidden; background: #000; }
.stp-scan-camera video { width: 100%; height: 100%; object-fit: cover; display: block; }
.stp-scan-aim { position: absolute; inset: 18%; border: 4px solid rgba(255, 255, 255, .9); border-radius: 20px; box-shadow: 0 0 0 999px rgba(0, 0, 0, .28); }
.stp-scan-big-words { margin: 0; font-size: 22px; font-weight: 800; line-height: 1.25; }

.stp-scan-type { display: grid; gap: 12px; width: 100%; max-width: 420px; margin: 0 auto; }
.stp-scan-type input { font-size: 26px; text-align: center; letter-spacing: .12em; min-height: 60px; }
.stp-scan-type input[name="contact"] { letter-spacing: 0; font-size: 20px; }

.stp-scan-said { margin: 0; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); font-size: 18px; font-weight: 700; line-height: 1.35; }
.stp-scan-said.bad { border-color: var(--red); color: var(--text); }
.stp-scan-said[hidden] { display: none; }

.stp-scan-stamps .lc-stamps { max-width: 440px; margin: 4px auto 0; color: var(--text); --lc-accent: var(--green); --lc-accent-ink: var(--green-ink); }
.stp-scan-stamps .lc-stamp { font-size: 20px; min-width: 0; }
.stp-scan-stamps .lc-stamp.on { font-size: 26px; }
.stp-scan-count { margin: 0; font-size: 24px; font-weight: 800; }
.stp-scan-spend { margin: 0; color: var(--gold); font-weight: 700; font-size: 18px; }
.stp-scan-ready { margin: 0; padding: 14px; border-radius: 16px; background: var(--gold); color: #1b1300; font-size: 22px; font-weight: 800; }
.stp-scan-done { margin: 4px 0 0; font-size: 44px; font-weight: 800; color: var(--green); line-height: 1.1; }

/* A set of buttons: every one the same size. */
.stp-scan-pair { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; gap: 10px; }
.stp-scan-pair .st-btn { width: 100%; padding: 0 12px; font-size: 16px; }
.stp-scan-handback[hidden] { display: none; }
.stp-scan-handback { display: grid; gap: 10px; justify-items: center; }
.stp-scan-qr { width: 240px; max-width: 70vw; background: #fff; border-radius: 16px; padding: 10px; }
.stp-scan-qr svg { display: block; width: 100%; height: auto; }

.stp-scan-spinner { width: 54px; height: 54px; margin: 40px auto; border-radius: 50%; border: 5px solid var(--line); border-top-color: var(--green); animation: stp-scan-spin .9s linear infinite; }
@keyframes stp-scan-spin { to { transform: rotate(360deg); } }

/* The Counter's page. */
.stp-scan-hero { max-width: 560px; width: 100%; margin: 6vh auto 0; justify-items: center; text-align: center; padding: 32px 24px; }
.stp-scan-hero h2 { margin: 0; font-size: 26px; }
.stp-scan-hero .st-btn { justify-self: stretch; }
.stp-scan-hero-icon { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); color: var(--green); }
.stp-scan-hero-icon .stp-scan-icon { width: 34px; height: 34px; }
.stp-scan-pair.two { width: 100%; }

@media (max-width: 560px) {
  .stp-scan-pair { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: 1fr; }
  .stp-scan-done { font-size: 38px; }
  .stp-scan-hero { margin-top: 2vh; padding: 24px 16px; }
}
