/* Free QR generator block and its landing pages (templates/marketing/_qr_generator.html, qr_generator.html).
   Loaded only by the pages that carry the block. Same Metro signage look as site.css (tokens come from there). */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.qrp-head { padding: 48px 0 24px; }
.qrp-h1 { font-size: clamp(2rem, 4.6vw, 3.25rem); margin-bottom: 0.3em; }
.qrp-head .lead { margin: 0; max-width: 46em; }
.qrp-tool { padding: 8px 0 72px; }
.qrp-h2 { font-size: 1.75rem; margin-top: 2em; }
.qrp-text { max-width: 46em; color: var(--ink-2); }
.qrp-h3 { font-size: 1.2rem; margin-top: 1.4em; }
.qrp-list { max-width: 46em; padding-left: 1.2em; color: var(--ink-2); }
.qrp-table-wrap { overflow-x: auto; border: 2px solid var(--ink); border-radius: var(--radius); background: var(--ground); }
.qrp-table { width: 100%; border-collapse: collapse; font-size: 1rem; min-width: 560px; }
.qrp-table th, .qrp-table td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.qrp-table thead th { background: var(--ink); color: #fff; border-bottom: 0; }
.qrp-table tbody th { font-weight: 700; width: 34%; }
.qrp-table tbody tr:last-child th, .qrp-table tbody tr:last-child td { border-bottom: 0; }

/* The block: fields on the left, preview and downloads on the right; on phones fields, preview, then options */
.qrg { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); grid-template-areas: "input" "out" "opts"; align-items: start; }
.qrg-input { grid-area: input; }
.qrg-opts { grid-area: opts; }
.qrg-out { grid-area: out; }
@media (min-width: 900px) {
  .qrg { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-areas: "input out" "opts out"; grid-template-rows: auto 1fr; gap: 24px 40px; }
  .qrg-out { position: sticky; top: 88px; }
}
.qrg-input, .qrg-opts, .qrg-out { background: var(--ground); border: 2px solid var(--ink); border-top: 8px solid var(--amarela); border-radius: var(--radius); padding: 20px; }
.qrg-opts { padding: 0 20px; border-top-width: 2px; }

.qrg-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.qrg-tabs[hidden] { display: none; }
.qrg-tabs button { min-height: 44px; padding: 0 16px; border-radius: var(--radius); border: 2px solid var(--ink); background: var(--ground); color: var(--ink); font: inherit; font-weight: 700; font-size: 0.95rem; cursor: pointer; }
.qrg-tabs button:hover { background: var(--panel); }
.qrg-tabs button[aria-selected="true"] { background: var(--ink); color: #fff; }
.qrg-tabs .qrg-more[aria-expanded="true"] { background: var(--panel); }
@media (max-width: 899px) {
  .qrg-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
  .qrg-tabs button { flex: none; }
  .qrg-tabs-more { flex-wrap: wrap; overflow-x: visible; }
}
.qrg-panel[hidden], .qrg-field[hidden] { display: none; }
.qrg-field { margin-bottom: 14px; }
.qrg-field .field { min-height: 48px; }
.qrg-field textarea.field { min-height: 96px; resize: vertical; }
.qrg-hint { font-size: 0.85rem; color: var(--ink-2); margin: 6px 0 0; }
.qrg-error { font-size: 0.9rem; font-weight: 600; color: var(--error); margin: 6px 0 0; }
.qrg-error[hidden], .qrg-hint[hidden] { display: none; }
.qrg-field .field[aria-invalid="true"] { border-color: var(--error); }
.qrg-check, .qrg-switch, .qrg-pill { display: flex; align-items: center; gap: 10px; font-size: 1rem; font-weight: 600; cursor: pointer; }
.qrg-check input { width: 22px; height: 22px; accent-color: var(--ink); }

.qrg-opt { border-bottom: 1px solid var(--rule); padding: 4px 0; }
.qrg-opt:last-child { border-bottom: 0; }
.qrg-opt summary { cursor: pointer; font-weight: 800; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; }
.qrg-opt summary::-webkit-details-marker { display: none; }
.qrg-opt summary::after { content: "+"; font-size: 1.4rem; line-height: 1; font-weight: 400; }
.qrg-opt[open] summary::after { content: "\2212"; }
.qrg-opt > :not(summary) { margin-bottom: 14px; }
.qrg-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.qrg-row label { margin: 0; }
.qrg-row[hidden] { display: none; }
.qrg-row input[type="color"] { width: 64px; height: 44px; padding: 2px; border: 2px solid var(--ink); border-radius: var(--radius); background: var(--ground); cursor: pointer; }
.qrg-shapes { border: 0; padding: 0; margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.qrg-shapes legend { font-size: 0.9rem; font-weight: 600; padding: 0; margin-bottom: 8px; }
.qrg-pill { border: 2px solid var(--ink); border-radius: var(--radius); padding: 8px 14px; min-height: 44px; font-size: 0.95rem; }
.qrg-pill:has(input:checked) { background: var(--ink); color: #fff; }
.qrg-pill input { accent-color: var(--amarela); }

.qrg-title { font-weight: 800; margin: 0 0 12px; }
.qrg-preview { background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; aspect-ratio: 1; max-width: 420px; margin: 0 auto 12px; overflow: hidden; }
.qrg-preview svg { width: 100%; height: auto; }
.qrg-empty { color: var(--ink-2); text-align: center; padding: 24px; margin: 0; }
.qrg-warnings { list-style: none; margin: 0 0 12px; padding: 0; }
.qrg-warnings li { background: var(--error-bg); border-left: 6px solid var(--error); padding: 10px 12px; margin-bottom: 8px; font-size: 0.9rem; font-weight: 600; }
.qrg-size { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; margin-top: 8px; }
.qrg-size label { margin: 0; }
.qrg-size input { width: 100%; accent-color: var(--ink); min-height: 32px; }
.qrg-size output { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.qrg-downloads { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 8px; }
.qrg-downloads .btn { flex: 1; min-width: 150px; }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: #000; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.qrg-pix { margin: 12px 0; }
.qrg-pix textarea { font-size: 0.8rem; word-break: break-all; }
.qrg-pix .btn { margin-top: 8px; }

.qrg-bridge { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--rule); }
.qrg-bridge [hidden], .qrg-after[hidden] { display: none; }
.qrg-bridge p { margin: 0 0 12px; }
.qrg-track { position: relative; flex: none; width: 48px; height: 28px; border: 2px solid var(--ink); border-radius: 14px; background: var(--ground); }
.qrg-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--ink); transition: transform 0.15s; }
.qrg-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.qrg-switch input:checked + .qrg-track { background: var(--verde); border-color: var(--ink); }
.qrg-switch input:checked + .qrg-track::after { transform: translateX(20px); background: #fff; }
.qrg-switch input:focus-visible + .qrg-track { outline: 3px solid var(--amarela); outline-offset: 2px; box-shadow: 0 0 0 2px var(--ink); }
.qrg-dynamic { margin-top: 12px; padding: 14px; background: var(--info-bg); border-left: 6px solid var(--azul); }
.qrg-mock { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink-2); }
/* The preview of the dynamic code (preset "dynamic", switch on): marked as a preview, no download */
.qrg-mark { margin: 8px 0 12px; padding: 12px 14px; border: 2px dashed var(--azul); border-radius: var(--radius); background: var(--info-bg); }
.qrg-mark .qrg-mock { margin: 6px 0 0; }
.qrg-badge { margin: 0; font-weight: 800; font-size: 0.9rem; color: var(--azul-dark); }
.qrg [data-static-only][hidden], .qrg [data-dynamic-only][hidden], .qrg [data-static-notice][hidden], .qrg [data-app-only][hidden] { display: none; }
/* The App tab: the sign-up offer, and the way out to a plain static code written as a link */
.qrg-app p { margin: 0 0 12px; }
.qrg-app .qrg-hint { margin: 8px 0 0; }
.qrg-linkbtn { padding: 0; border: 0; background: none; font: inherit; font-weight: 700; color: var(--azul-dark); text-decoration: underline; cursor: pointer; }
.qrg-linkbtn:focus-visible { outline: 3px solid var(--amarela); outline-offset: 2px; box-shadow: 0 0 0 2px var(--ink); }
.qrg-after { margin-top: 14px; padding: 14px; border: 2px solid var(--ink); border-left-width: 8px; border-left-color: var(--amarela); }
.qrg-after p { margin: 0 0 10px; font-weight: 600; }
/* Links to the other QR code types and the hub's cards */
.qrp-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.qrp-links a { display: inline-block; padding: 6px 0; }
.qrp-note { margin-top: 20px; max-width: 46em; color: var(--ink-2); font-size: 0.875rem; }
.qrp-card-title { font-size: 1.25rem; margin: 0 0 6px; }

/* The account panel of the first download (download-panel.js, #69): a modal on wide screens, a bottom sheet on phones.
   The only motion is the bar of the real wait; reduced motion skips the wait itself, so no animation is left. */
.qrg-sheet-root { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; background: rgba(0, 0, 0, 0.55); }
.qrg-sheet-root[hidden] { display: none; }
html.qrg-sheet-open { overflow: hidden; }
.qrg-sheet { position: relative; width: 100%; max-height: 92vh; overflow-y: auto; padding: 20px 20px 24px; background: var(--ground); border-top: 8px solid var(--amarela); border-radius: var(--radius) var(--radius) 0 0; color: var(--ink); }
.qrg-sheet:focus { outline: none; }
@media (min-width: 640px) {
  .qrg-sheet-root { align-items: center; }
  .qrg-sheet { width: min(520px, calc(100vw - 32px)); border: 2px solid var(--ink); border-top: 8px solid var(--amarela); border-radius: var(--radius); }
}
.qrg-sheet-x { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; border: 2px solid var(--ink); border-radius: var(--radius); background: var(--ground); color: var(--ink); font: inherit; font-size: 1.5rem; line-height: 1; cursor: pointer; }
.qrg-sheet-x:hover { background: var(--panel); }
.qrg-sheet-x:focus-visible, .qrg-sheet-later:focus-visible, .qrg-sheet-retry:focus-visible { outline: 3px solid var(--amarela); outline-offset: 2px; box-shadow: 0 0 0 2px var(--ink); }
.qrg-sheet-title { margin: 0 56px 10px 0; font-size: 1.25rem; font-weight: 800; }
.qrg-wait { height: 10px; margin-bottom: 14px; border: 2px solid var(--ink); border-radius: 5px; background: var(--ground); overflow: hidden; }
.qrg-wait[hidden], .qrg-sheet-retry[hidden], .qrg-sheet-pair[hidden], .qrg-sheet [hidden] { display: none; }
.qrg-wait-bar { display: block; height: 100%; width: 100%; background: var(--azul); transform-origin: left; animation: qrg-fill var(--wait, 1500ms) linear forwards; }
@keyframes qrg-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) { .qrg-wait-bar { animation: none; } }
.qrg-sheet-retry { display: inline-block; margin-bottom: 14px; padding: 8px 0; font-weight: 700; }
.qrg-sheet-offer { padding-top: 14px; border-top: 1px solid var(--rule); }
.qrg-sheet-offer-title { margin: 0 0 10px; font-weight: 800; }
.qrg-sheet-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 12px; }
.qrg-sheet-pair figure { margin: 0; text-align: center; font-size: 0.85rem; font-weight: 600; }
.qrg-sheet-qr svg { display: block; width: 100%; max-width: 140px; height: auto; margin: 0 auto 6px; }
.qrg-sheet-offer p { margin: 0 0 12px; }
.qrg-sheet-google { width: 100%; justify-content: center; gap: 10px; margin-bottom: 12px; }
.qrg-sheet-row { display: flex; gap: 8px; margin-top: 6px; }
.qrg-sheet-row .field { flex: 1; min-width: 0; min-height: 48px; }
.qrg-sheet-later { width: 100%; margin-top: 4px; }
