Spaces:
Running

quantilimited commited on
Commit
28ddfde
·
verified ·
1 Parent(s): 1511c70

Upload 4 files

Browse files
Files changed (4) hide show
  1. SETUP.html +2 -2
  2. js/admin.js +3 -3
  3. js/pricing.js +142 -90
  4. styles.css +51 -0
SETUP.html CHANGED
@@ -337,8 +337,8 @@
337
  </div>
338
  </div>
339
  </div>
340
- <div class="do"><b>Do this:</b> sign in, open <b>Plans</b> and press one. The checkout page opens with the amount, the reference and the account — exactly what a buyer sees — and an order appears in <b>Developer → People</b> straight away. Press <b>I have sent the payment</b> on the page, then check your bank and press <b>Mark paid</b> <span class="pin">8</span> on the order. That records the payment and puts the plan on their Account page in one click.</div>
341
- <div class="warn">Bank transfer is manual by design: the money arrives with the reference, and you match it to the person. Orders show "Opened" until the buyer confirms, then "Sent — check the bank". Automatic unlocking needs a card processor — that is the Stripe route in <code class="inline">supabase/SETUP.md</code>.</div>
342
  </div>
343
  </section>
344
 
 
337
  </div>
338
  </div>
339
  </div>
340
+ <div class="do"><b>Do this:</b> sign in, open <b>Plans</b> and press one. The checkout page opens with the amount and one <b>Confirm purchase</b> button — exactly what a buyer sees — and an order appears in <b>Developer → People</b> straight away. Press <b>Confirm purchase</b>, then check your bank and press <b>Mark paid</b> <span class="pin">8</span> on the order. That records the payment and puts the plan on their Account page in one click.</div>
341
+ <div class="warn">Bank transfer is manual by design: the money arrives with the reference, and you match it to the person. Orders show "Opened" until the buyer confirms, then "Confirmed — check the bank". Automatic unlocking needs a card processor — that is the Stripe route in <code class="inline">supabase/SETUP.md</code>.</div>
342
  </div>
343
  </section>
344
 
js/admin.js CHANGED
@@ -541,7 +541,7 @@ function PeopleTab() {
541
  <span class="pill warn">${pending.length} to check</span>
542
  </div>
543
  <div class="tiny faint" style=${{ marginBottom: "8px", lineHeight: 1.55 }}>
544
- An order appears the moment someone opens the payment page. "Sent" means they have told us the money is on its way — check your bank, then press Mark paid.
545
  </div>
546
  <div class="list">
547
  ${pending.map(
@@ -550,13 +550,13 @@ function PeopleTab() {
550
  <div class="t">
551
  <span class="mono">${o.reference}</span>
552
  <span class=${"pill " + (o.status === "sent" ? "warn" : "neutral")} style=${{ marginLeft: "6px" }}>
553
- ${o.status === "sent" ? "Sent — check the bank" : "Opened, not sent yet"}
554
  </span>
555
  </div>
556
  <div class="s">${o.email} · ${o.plan_name || o.plan_id} · ${money(o.amount_cents, o.currency)}</div>
557
  <div class="s">
558
  Opened ${new Date(o.created_at || Date.now()).toLocaleDateString("en-GB")}
559
- ${o.sent_at ? " · marked sent " + new Date(o.sent_at).toLocaleString("en-GB") : ""}
560
  ${o.payer_note ? " · “" + o.payer_note + "”" : ""}
561
  </div>
562
  </div>
 
541
  <span class="pill warn">${pending.length} to check</span>
542
  </div>
543
  <div class="tiny faint" style=${{ marginBottom: "8px", lineHeight: 1.55 }}>
544
+ An order appears the moment someone opens the payment page. "Confirmed" means they have placed the order and been shown the bank details — check your bank, then press Mark paid.
545
  </div>
546
  <div class="list">
547
  ${pending.map(
 
550
  <div class="t">
551
  <span class="mono">${o.reference}</span>
552
  <span class=${"pill " + (o.status === "sent" ? "warn" : "neutral")} style=${{ marginLeft: "6px" }}>
553
+ ${o.status === "sent" ? "Confirmed — check the bank" : "Opened, not confirmed"}
554
  </span>
555
  </div>
556
  <div class="s">${o.email} · ${o.plan_name || o.plan_id} · ${money(o.amount_cents, o.currency)}</div>
557
  <div class="s">
558
  Opened ${new Date(o.created_at || Date.now()).toLocaleDateString("en-GB")}
559
+ ${o.sent_at ? " · confirmed purchase " + new Date(o.sent_at).toLocaleString("en-GB") : ""}
560
  ${o.payer_note ? " · “" + o.payer_note + "”" : ""}
561
  </div>
562
  </div>
js/pricing.js CHANGED
@@ -89,7 +89,7 @@ function PayField({ label, value }) {
89
  </div>`;
90
  }
91
 
92
- function OrderSummary({ order, plan, email }) {
93
  const name = (plan && plan.name) || order.planName || "Your plan";
94
  const features = (plan && plan.features) || [];
95
  const period = order.kind === "subscription" ? "per " + (order.interval || "month") : "once";
@@ -103,7 +103,8 @@ function OrderSummary({ order, plan, email }) {
103
  </ul>`}
104
  <div class="divider" style=${{ margin: "14px 0 10px" }}></div>
105
  <div class="row between"><span class="tiny muted">Account</span><span class="tiny mono">${email}</span></div>
106
- <div class="row between" style=${{ marginTop: "6px" }}><span class="tiny muted">Reference</span><span class="tiny mono">${order.reference}</span></div>
 
107
  <div class="tiny faint" style=${{ marginTop: "12px", lineHeight: 1.6 }}>
108
  ${order.kind === "subscription"
109
  ? "Monthly. Nothing is taken automatically — you send each month you want to keep it."
@@ -112,27 +113,43 @@ function OrderSummary({ order, plan, email }) {
112
  </aside>`;
113
  }
114
 
115
- function Awaiting({ order }) {
116
- const when = order.sentAt
117
- ? "You told us on " + new Date(order.sentAt).toLocaleString("en-GB", { dateStyle: "long", timeStyle: "short" }) + ". "
118
- : "";
 
 
 
 
 
119
  return html`<div class="pay-step">
120
  <div class="pay-step-head">
121
  <span class="pay-step-num"><${Icon} name="check" size=${12} /></span>
122
  <div>
123
- <div class="pay-step-title">${order.status === "paid" ? "Payment confirmed" : "Marked as sent"}</div>
124
  <div class="tiny muted" style=${{ marginTop: "2px", lineHeight: 1.6 }}>
125
- ${order.status === "paid"
126
- ? "The payment has been checked and your plan is active on this account."
127
- : when + "We check each transfer by hand, then switch your plan on — usually within one working day."}
128
  </div>
129
  </div>
130
  </div>
131
- <div class="callout green" style=${{ marginTop: "12px" }}>
132
- <strong>${order.status === "paid" ? "You're all set." : "Nothing else to do."}</strong>
133
- Your reference is ${order.reference}. Keep it if you need to ask us about this payment.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
134
  </div>
135
- ${order.status === "paid" && html`<div class="row" style=${{ marginTop: "12px" }}><a class="btn small primary" href="#/account">See your plan</a></div>`}
136
  </div>`;
137
  }
138
 
@@ -141,13 +158,16 @@ export function Checkout({ planId }) {
141
  const [order, setOrder] = useState(null);
142
  const [loading, setLoading] = useState(true);
143
  const [error, setError] = useState("");
144
- const [note, setNote] = useState("");
145
  const [copied, setCopied] = useState("");
146
  const [busy, setBusy] = useState(false);
147
 
148
  const plan = cloud.plans.find((p) => p.id === planId) || null;
149
  const signedIn = !!cloud.user;
150
  const userId = cloud.user ? cloud.user.id : "";
 
 
 
 
151
 
152
  // Opening this page is what creates the order, so the developer can see the
153
  // reference, email and plan before the money arrives.
@@ -155,7 +175,7 @@ export function Checkout({ planId }) {
155
  let live = true;
156
  setOrder(null);
157
  setError("");
158
- if (!userId) {
159
  setLoading(false);
160
  return () => {
161
  live = false;
@@ -167,7 +187,6 @@ export function Checkout({ planId }) {
167
  .then((data) => {
168
  if (!live) return;
169
  setOrder(data);
170
- setNote(data.payerNote || "");
171
  })
172
  .catch((err) => {
173
  if (live) setError(err && err.message ? err.message : "The payment details could not be loaded.");
@@ -178,7 +197,7 @@ export function Checkout({ planId }) {
178
  return () => {
179
  live = false;
180
  };
181
- }, [planId, userId]);
182
 
183
  const copy = (what, text) => {
184
  navigator.clipboard
@@ -194,8 +213,9 @@ export function Checkout({ planId }) {
194
  setBusy(true);
195
  setError("");
196
  try {
197
- const data = await cloud.confirmBankTransfer(order.orderId, note);
198
  setOrder(data);
 
199
  } catch (err) {
200
  setError(err && err.message ? err.message : "That could not be recorded.");
201
  }
@@ -222,6 +242,18 @@ export function Checkout({ planId }) {
222
  </main>`;
223
  }
224
 
 
 
 
 
 
 
 
 
 
 
 
 
225
  if (loading) {
226
  return html`<main class="page narrow">
227
  <div class="card" style=${{ marginTop: "16px" }}>
@@ -239,92 +271,112 @@ export function Checkout({ planId }) {
239
  </main>`;
240
  }
241
 
242
- const detailsText = [
243
- "Explication — " + order.planName,
244
- "Amount: " + order.amount,
245
- "Account name: " + order.accountName,
246
- "Sort code: " + order.sortCode,
247
- "Account number: " + order.accountNumber,
248
- "Reference: " + order.reference
249
- ].join("\n");
 
 
 
250
 
251
- return html`<main class="page">
252
- <div class="row between wrap" style=${{ alignItems: "flex-end" }}>
253
- <div>
254
- <div class="eyebrow">Checkout</div>
255
- <h1 class="page-title">Pay ${order.amount}</h1>
256
- <p class="subtitle">${order.planName} · bank transfer. No card, no fees.</p>
 
 
 
 
 
257
  </div>
258
- <a class="btn small ghost" href="#/pricing">Back to plans</a>
259
- </div>
260
 
261
- ${error && html`<div style=${{ marginTop: "12px" }}><${Notice} kind="error">${error}<//></div>`}
262
 
263
- <div class="checkout">
264
- <${OrderSummary} order=${order} plan=${plan} email=${cloud.user.email} />
265
 
266
- <section>
267
- <div class="pay-step">
268
- <div class="pay-step-head">
269
- <span class="pay-step-num">1</span>
270
- <div>
271
- <div class="pay-step-title">Send ${order.amount} from your bank app</div>
272
- <div class="tiny muted" style=${{ marginTop: "2px" }}>Use the reference below, so the payment is matched to this order.</div>
273
  </div>
274
- </div>
275
- <div class="pay-grid">
276
- <${PayField} label="Account name" value=${order.accountName} />
277
- <${PayField} label="Sort code" value=${order.sortCode} />
278
- <${PayField} label="Account number" value=${order.accountNumber} />
279
- </div>
280
- <div class="pay-ref">
281
- <div>
282
- <span class="lab">Payment reference</span>
283
- <span class="val">${order.reference}</span>
284
  </div>
285
- <button class="btn small" onClick=${() => copy("ref", order.reference)}>${copied === "ref" ? "Copied" : "Copy"}</button>
286
- </div>
287
- <div class="row between wrap" style=${{ marginTop: "10px" }}>
288
- <span class="tiny faint" style=${{ maxWidth: "430px", lineHeight: 1.55 }}>
289
- These details are fetched from our server each time this page opens. They are not stored in the site's files.
290
- </span>
291
- <button class="btn small" onClick=${() => copy("all", detailsText)}>${copied === "all" ? "Copied" : "Copy all details"}</button>
292
  </div>
293
- </div>
294
 
295
- ${order.status === "opened" &&
296
- html`<div class="pay-step">
297
- <div class="pay-step-head">
298
- <span class="pay-step-num">2</span>
299
  <div>
300
- <div class="pay-step-title">Confirm you have sent it</div>
301
- <div class="tiny muted" style=${{ marginTop: "2px", lineHeight: 1.6 }}>
302
- We check every transfer by hand and switch your plan on once it lands — usually within one working day.
303
- </div>
304
  </div>
305
- </div>
306
- <div style=${{ marginTop: "12px", maxWidth: "420px" }}>
307
- <div class="field">
308
- <label>Name on the account you paid from <span class="hint">optional, helps us match it</span></label>
309
- <input class="input" value=${note} onInput=${(e) => setNote(e.target.value)} placeholder="e.g. L Owen" spellCheck=${false} />
 
 
310
  </div>
311
  </div>
312
- <div class="row wrap" style=${{ marginTop: "12px" }}>
313
- <button class="btn primary small" onClick=${confirm} disabled=${busy}>
314
- ${busy ? html`<span class="spin"></span>` : "I have sent the payment"}
315
- </button>
316
- <span class="tiny faint">This records the order — it does not take any money.</span>
317
- </div>
318
- </div>`}
319
 
320
- ${(order.status === "sent" || order.status === "paid") && html`<${Awaiting} order=${order} />`}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
321
 
322
- ${order.status === "cancelled" &&
323
- html`<div class="pay-step">
324
- <div class="pay-step-title">This order was cancelled</div>
325
- <div class="tiny muted" style=${{ marginTop: "4px" }}>Nothing was charged. You can start again from the plans page.</div>
326
- <div class="row" style=${{ marginTop: "12px" }}><a class="btn small primary" href="#/pricing">Choose a plan</a></div>
327
- </div>`}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
328
 
329
  <p class="tiny faint" style=${{ marginTop: "4px", lineHeight: 1.6 }}>
330
  ${order.note || "One payment. Nothing renews."}
 
89
  </div>`;
90
  }
91
 
92
+ function OrderSummary({ order, plan, email, showRef }) {
93
  const name = (plan && plan.name) || order.planName || "Your plan";
94
  const features = (plan && plan.features) || [];
95
  const period = order.kind === "subscription" ? "per " + (order.interval || "month") : "once";
 
103
  </ul>`}
104
  <div class="divider" style=${{ margin: "14px 0 10px" }}></div>
105
  <div class="row between"><span class="tiny muted">Account</span><span class="tiny mono">${email}</span></div>
106
+ ${showRef &&
107
+ html`<div class="row between" style=${{ marginTop: "6px" }}><span class="tiny muted">Reference</span><span class="tiny mono">${order.reference}</span></div>`}
108
  <div class="tiny faint" style=${{ marginTop: "12px", lineHeight: 1.6 }}>
109
  ${order.kind === "subscription"
110
  ? "Monthly. Nothing is taken automatically — you send each month you want to keep it."
 
113
  </aside>`;
114
  }
115
 
116
+ function TransferDetails({ order, copied, copy }) {
117
+ const text = [
118
+ "Explication — " + order.planName,
119
+ "Amount: " + order.amount,
120
+ "Account name: " + order.accountName,
121
+ "Sort code: " + order.sortCode,
122
+ "Account number: " + order.accountNumber,
123
+ "Reference: " + order.reference
124
+ ].join("\n");
125
  return html`<div class="pay-step">
126
  <div class="pay-step-head">
127
  <span class="pay-step-num"><${Icon} name="check" size=${12} /></span>
128
  <div>
129
+ <div class="pay-step-title">Send ${order.amount} from your bank app</div>
130
  <div class="tiny muted" style=${{ marginTop: "2px", lineHeight: 1.6 }}>
131
+ Use the reference below, so the transfer is matched to this order.
 
 
132
  </div>
133
  </div>
134
  </div>
135
+ <div class="pay-grid">
136
+ <${PayField} label="Account name" value=${order.accountName} />
137
+ <${PayField} label="Sort code" value=${order.sortCode} />
138
+ <${PayField} label="Account number" value=${order.accountNumber} />
139
+ </div>
140
+ <div class="pay-ref">
141
+ <div>
142
+ <span class="lab">Payment reference</span>
143
+ <span class="val">${order.reference}</span>
144
+ </div>
145
+ <button class="btn small" onClick=${() => copy("ref", order.reference)}>${copied === "ref" ? "Copied" : "Copy"}</button>
146
+ </div>
147
+ <div class="row between wrap" style=${{ marginTop: "10px" }}>
148
+ <span class="tiny faint" style=${{ maxWidth: "430px", lineHeight: 1.55 }}>
149
+ These details are fetched from our server each time this page opens. They are not stored in the site's files.
150
+ </span>
151
+ <button class="btn small" onClick=${() => copy("all", text)}>${copied === "all" ? "Copied" : "Copy all details"}</button>
152
  </div>
 
153
  </div>`;
154
  }
155
 
 
158
  const [order, setOrder] = useState(null);
159
  const [loading, setLoading] = useState(true);
160
  const [error, setError] = useState("");
 
161
  const [copied, setCopied] = useState("");
162
  const [busy, setBusy] = useState(false);
163
 
164
  const plan = cloud.plans.find((p) => p.id === planId) || null;
165
  const signedIn = !!cloud.user;
166
  const userId = cloud.user ? cloud.user.id : "";
167
+ const ownsPlan = (cloud.entitlements || []).some((e) => {
168
+ if (e.plan_id !== planId || e.revoked) return false;
169
+ return !e.expires_at || new Date(e.expires_at).getTime() > Date.now();
170
+ });
171
 
172
  // Opening this page is what creates the order, so the developer can see the
173
  // reference, email and plan before the money arrives.
 
175
  let live = true;
176
  setOrder(null);
177
  setError("");
178
+ if (!userId || ownsPlan) {
179
  setLoading(false);
180
  return () => {
181
  live = false;
 
187
  .then((data) => {
188
  if (!live) return;
189
  setOrder(data);
 
190
  })
191
  .catch((err) => {
192
  if (live) setError(err && err.message ? err.message : "The payment details could not be loaded.");
 
197
  return () => {
198
  live = false;
199
  };
200
+ }, [planId, userId, ownsPlan]);
201
 
202
  const copy = (what, text) => {
203
  navigator.clipboard
 
213
  setBusy(true);
214
  setError("");
215
  try {
216
+ const data = await cloud.confirmBankTransfer(order.orderId, "");
217
  setOrder(data);
218
+ window.scrollTo({ top: 0, behavior: "instant" });
219
  } catch (err) {
220
  setError(err && err.message ? err.message : "That could not be recorded.");
221
  }
 
242
  </main>`;
243
  }
244
 
245
+ if (ownsPlan) {
246
+ return html`<main class="page narrow">
247
+ <div class="eyebrow">Checkout</div>
248
+ <h1 class="page-title">You already have this</h1>
249
+ <p class="subtitle">${(plan && plan.name) || "This plan"} is active on your account. There is nothing else to pay.</p>
250
+ <div class="row" style=${{ marginTop: "14px" }}>
251
+ <a class="btn small primary" href="#/account">See your plan</a>
252
+ <a class="btn small ghost" href="#/pricing">Back to plans</a>
253
+ </div>
254
+ </main>`;
255
+ }
256
+
257
  if (loading) {
258
  return html`<main class="page narrow">
259
  <div class="card" style=${{ marginTop: "16px" }}>
 
271
  </main>`;
272
  }
273
 
274
+ if (order.status === "cancelled") {
275
+ return html`<main class="page narrow">
276
+ <div class="eyebrow">Checkout</div>
277
+ <h1 class="page-title">This order was cancelled</h1>
278
+ <p class="subtitle">Nothing was charged. You can start again whenever you like.</p>
279
+ <div class="row" style=${{ marginTop: "14px" }}>
280
+ <a class="btn small primary" href="#/pricing">Choose a plan</a>
281
+ <a class="btn small ghost" href="#/account">My account</a>
282
+ </div>
283
+ </main>`;
284
+ }
285
 
286
+ // Two clicks: Join on the plans page, then Confirm purchase here. Only after
287
+ // that is the buyer shown what to send, so there is nothing to fill in.
288
+ if (order.status === "opened") {
289
+ return html`<main class="page">
290
+ <div class="row between wrap" style=${{ alignItems: "flex-end" }}>
291
+ <div>
292
+ <div class="eyebrow">Checkout</div>
293
+ <h1 class="page-title">Confirm your plan</h1>
294
+ <p class="subtitle">${order.planName} · ${order.amount} ${order.kind === "subscription" ? "a month" : "once"}. Bank transfer, no card.</p>
295
+ </div>
296
+ <a class="btn small ghost" href="#/pricing">Back to plans</a>
297
  </div>
 
 
298
 
299
+ ${error && html`<div style=${{ marginTop: "12px" }}><${Notice} kind="error">${error}<//></div>`}
300
 
301
+ <div class="checkout">
302
+ <${OrderSummary} order=${order} plan=${plan} email=${cloud.user.email} />
303
 
304
+ <section>
305
+ <div class="card checkout-buy">
306
+ <div class="eyebrow">Ready when you are</div>
307
+ <div class="checkout-total">
308
+ <span>Total today</span>
309
+ <strong>${order.amount}</strong>
 
310
  </div>
311
+ <button class="btn primary checkout-buy-btn" onClick=${confirm} disabled=${busy}>
312
+ ${busy ? html`<span class="spin"></span>` : "Confirm purchase"}
313
+ </button>
314
+ <div class="tiny faint" style=${{ marginTop: "10px", lineHeight: 1.6 }}>
315
+ One click. The next screen shows the account details and your reference to send the transfer.
 
 
 
 
 
316
  </div>
 
 
 
 
 
 
 
317
  </div>
 
318
 
319
+ <div class="checkout-steps">
 
 
 
320
  <div>
321
+ <span>1</span>
322
+ <div><strong>Confirm purchase</strong><div class="tiny muted">This opens your order and reserves your reference. No money is taken.</div></div>
 
 
323
  </div>
324
+ <div>
325
+ <span>2</span>
326
+ <div><strong>Send the transfer</strong><div class="tiny muted">Copy the account details into your bank app.</div></div>
327
+ </div>
328
+ <div>
329
+ <span>3</span>
330
+ <div><strong>We switch it on</strong><div class="tiny muted">Every transfer is checked by hand — usually within one working day.</div></div>
331
  </div>
332
  </div>
 
 
 
 
 
 
 
333
 
334
+ <p class="tiny faint" style=${{ marginTop: "12px", lineHeight: 1.6 }}>
335
+ ${order.note || "One payment. Nothing renews."}
336
+ </p>
337
+ </section>
338
+ </div>
339
+ </main>`;
340
+ }
341
+
342
+ const paid = order.status === "paid";
343
+ return html`<main class="page">
344
+ <div class="row between wrap" style=${{ alignItems: "flex-end" }}>
345
+ <div>
346
+ <div class="eyebrow">${paid ? "Paid" : "Order confirmed"}</div>
347
+ <h1 class="page-title">${paid ? "Your plan is active" : "One transfer to go"}</h1>
348
+ <p class="subtitle">
349
+ ${paid
350
+ ? order.planName + " is on your account."
351
+ : "Send " + order.amount + " with your reference, and we will switch " + order.planName + " on."}
352
+ </p>
353
+ </div>
354
+ <a class="btn small ghost" href="#/account">My account</a>
355
+ </div>
356
+
357
+ ${error && html`<div style=${{ marginTop: "12px" }}><${Notice} kind="error">${error}<//></div>`}
358
 
359
+ <div class="checkout">
360
+ <${OrderSummary} order=${order} plan=${plan} email=${cloud.user.email} showRef />
361
+
362
+ <section>
363
+ ${paid
364
+ ? html`<div class="pay-step">
365
+ <div class="pay-step-head">
366
+ <span class="pay-step-num"><${Icon} name="check" size=${12} /></span>
367
+ <div>
368
+ <div class="pay-step-title">Payment confirmed</div>
369
+ <div class="tiny muted" style=${{ marginTop: "2px", lineHeight: 1.6 }}>
370
+ We checked the transfer and switched your plan on. Nothing else to do.
371
+ </div>
372
+ </div>
373
+ </div>
374
+ <div class="row" style=${{ marginTop: "12px" }}><a class="btn small primary" href="#/account">See your plan</a></div>
375
+ </div>`
376
+ : html`<${TransferDetails} order=${order} copied=${copied} copy=${copy} />
377
+ <div class="callout green" style=${{ marginTop: "12px" }}>
378
+ <strong>Order confirmed.</strong> Your reference is ${order.reference}. We check every transfer by hand and switch your plan on as soon as it lands — usually within one working day.
379
+ </div>`}
380
 
381
  <p class="tiny faint" style=${{ marginTop: "4px", lineHeight: 1.6 }}>
382
  ${order.note || "One payment. Nothing renews."}
styles.css CHANGED
@@ -548,3 +548,54 @@ a { color: var(--accent); text-decoration: none; }
548
  @media (max-width: 520px) {
549
  .pay-grid { grid-template-columns: 1fr; }
550
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
548
  @media (max-width: 520px) {
549
  .pay-grid { grid-template-columns: 1fr; }
550
  }
551
+
552
+ /* Two-click checkout */
553
+ .checkout-buy { padding: 18px; }
554
+ .checkout-total {
555
+ display: flex;
556
+ align-items: baseline;
557
+ justify-content: space-between;
558
+ gap: 12px;
559
+ margin: 4px 0 14px;
560
+ }
561
+ .checkout-total span {
562
+ font-size: 10px;
563
+ letter-spacing: .08em;
564
+ text-transform: uppercase;
565
+ color: var(--faint);
566
+ font-weight: 700;
567
+ }
568
+ .checkout-total strong {
569
+ font-size: 30px;
570
+ font-weight: 650;
571
+ letter-spacing: -.02em;
572
+ }
573
+ .checkout-buy-btn {
574
+ width: 100%;
575
+ padding: 13px 18px;
576
+ font-size: 15px;
577
+ }
578
+ .checkout-steps {
579
+ display: grid;
580
+ gap: 12px;
581
+ margin-top: 16px;
582
+ padding: 0 2px;
583
+ }
584
+ .checkout-steps > div {
585
+ display: flex;
586
+ gap: 10px;
587
+ align-items: flex-start;
588
+ }
589
+ .checkout-steps > div > span {
590
+ width: 22px;
591
+ height: 22px;
592
+ border-radius: 50%;
593
+ border: 1px solid var(--hairline);
594
+ display: inline-flex;
595
+ align-items: center;
596
+ justify-content: center;
597
+ font-size: 11px;
598
+ font-weight: 700;
599
+ flex: none;
600
+ }
601
+ .checkout-steps strong { font-size: 13px; font-weight: 600; }