/* web-offer: the offer surface (F1–F8, landing, /senha) on top of ui/components.css + ui/groups/f.css.
   Only what real pages need beyond the artboards: real form controls, sticky bars, fixed sheets, the full-height
   preview frame and a few live states (countdown expiry, copy feedback). Tokens only. */

/* ---------- real form controls inside the artboard field shells ---------- */
.input .field input, .input .field textarea, .textarea-field textarea {
  flex: 1 1 auto; min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink);
  font: inherit; padding: 0; margin: 0;
}
.input .field input::placeholder, .textarea-field textarea::placeholder { color: var(--ink-subtle); }
.input .field:focus-within { box-shadow: inset 0 0 0 2px var(--ink); }
.input.error .field, .input.error .field:focus-within { box-shadow: inset 0 0 0 2px var(--red); }
.textarea-field textarea { resize: vertical; min-height: 64px; }
.textarea-field:focus-within { box-shadow: inset 0 0 0 2px var(--ink); }

/* radio options (F3 payment method, F7 reasons): a real <input type=radio> drives the artboard look */
.pay-option { cursor: pointer; position: relative; }
.pay-option:has(input:checked) { box-shadow: inset 0 0 0 2px var(--ink); }
.pay-option:has(input:checked) .radio { box-shadow: inset 0 0 0 7px var(--ink); }
.pay-option:has(input:checked) .opt-icon { background: var(--live-soft); color: var(--live-strong); }
.pay-option:has(input:focus-visible) { outline: 2px solid var(--live); outline-offset: 2px; }

/* a <form> that wraps a whole screen (top bar, content, bottom bar) keeps the column layout */
.page-form { display: contents; }
.page-form > .content { flex: 1 1 auto; display: flex; flex-direction: column; padding: 8px 24px 24px; gap: 16px; }

/* artboard buttons are <a> without href; real links must not get the browser underline */
a.btn, a.circle-btn, a.btn:hover { text-decoration: none; }

/* ---------- sticky bars (the artboard's home indicator gave the bottom spacing) ---------- */
.screen.page .bottom-bar { position: sticky; bottom: 0; z-index: 5; margin-top: auto; }
.screen.page .bottom-bar > .inner { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
.screen.page .bottom-bar form { display: flex; flex-direction: column; }
.screen.page .top-bar { padding-top: 8px; }

/* F1: the CTA repeats as a sticky bar once the price card scrolls away */
.sticky-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; max-width: 480px; margin: 0 auto;
              box-shadow: var(--shadow-float); }
.sticky-cta > .row { padding: 12px 24px calc(12px + env(safe-area-inset-bottom)); }
.sticky-cta[hidden] { display: none; }

/* ---------- F1 ---------- */
.offer-page .screen.page > .content { gap: 24px; padding-top: 12px; padding-bottom: 104px; } /* room for the sticky CTA */
.thumb-link { display: block; color: inherit; text-decoration: none; }
.site-preview .photo { background-size: cover; background-position: center; }
.page-foot .text-link { text-decoration-line: underline; }

/* ---------- F2: the Worker-served site in a frame under the ribbon ---------- */
.screen.page.preview-page { max-width: none; height: 100vh; height: 100dvh; min-height: 0; display: flex;
                            flex-direction: column; overflow: hidden; }
.preview-page .ribbon { position: relative; }
.preview-page .ribbon a { color: inherit; text-decoration: none; }
.preview-page .ribbon .btn.live { color: var(--ink-deep); }
.preview-page .ribbon .mark { display: grid; }
.preview-page .site-frame { flex: 1 1 auto; width: 100%; min-height: 0; border: 0; display: block; background: var(--surface); }

/* ---------- F4 PIX ---------- */
.qr-card .qr-img { display: block; width: 200px; height: 200px; image-rendering: pixelated; }
.code-input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink-muted);
              font: 400 13px/18px var(--font-ui); letter-spacing: .02em; text-overflow: ellipsis; padding: 0; }
.wait .wait-expired { display: none; }
.wait.expired { background: var(--red-soft); }
.wait.expired .wait-live { display: none; }
.wait.expired .wait-expired { display: flex; }
.wait .wait-expired form { display: flex; flex-direction: column; }
.spin { display: inline-grid; place-items: center; }
.spin .i { animation: offer-spin 1.2s linear infinite; }
@keyframes offer-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin .i { animation: none; } }
.btn.copied { background: var(--live); color: var(--ink-deep); }
.dev-pay { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: var(--r-md);
           border: 1px dashed var(--ink-subtle); }
.pix-foot { justify-content: center; padding: 0 24px calc(20px + env(safe-area-inset-bottom)); }

/* ---------- F5 ---------- */
.offer-paid-page .screen.page > .content { padding-bottom: 24px; }

/* ---------- F6 / "sem interesse": real sheet over the dimmed offer ---------- */
.offer-sheet-page .backdrop { display: flex; flex-direction: column; gap: 24px; pointer-events: none; }
.offer-sheet-page .scrim { position: fixed; inset: 0; z-index: 10; }
.offer-sheet-page .sheet { position: fixed; z-index: 11; max-width: 480px; margin: 0 auto; max-height: 92vh;
                           max-height: 92dvh; overflow-y: auto; padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
.offer-sheet-page .sheet .sheet-body { padding-bottom: 8px; }

/* ---------- thank-you states ---------- */
.done-art .core { color: var(--live-strong); }

/* ---------- landing ---------- */
.landing-page .screen.page > .content { gap: 24px; padding-top: 16px; }
.landing-hero .tag { align-self: flex-start; }
.landing-demo { height: 196px; }
.landing-page .steps { gap: 4px; }

/* ---------- /privacidade, /termos, /suporte: long-form text on the type scale ---------- */
.legal-page .screen.page > .content { gap: 24px; padding-top: 16px; }
.legal-head { display: flex; flex-direction: column; gap: 8px; }
.legal { display: flex; flex-direction: column; gap: 12px; color: var(--ink); }
.legal h2 { font: 600 22px/28px var(--font-display); letter-spacing: -0.01em; margin: 20px 0 0; }   /* .t-title */
.legal h3 { font: 600 17px/22px var(--font-ui); margin: 8px 0 0; }                                /* .t-headline */
.legal p, .legal li { font: 400 15px/21px var(--font-ui); margin: 0; }                           /* .t-body */
.legal ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.legal strong { font-weight: 600; }
.legal a { color: var(--live-strong); }
.legal h2[id], .legal h3[id] { scroll-margin-top: 16px; }
.legal-nav { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.legal-nav a { font: 600 13px/18px var(--font-ui); color: var(--ink); }
