/* /pay — the payment page's own styles (it is a static page, outside Next.js:
   web/pay/pay.js says why). The same look as the sign-in screens
   (components/auth-ui.module.css) and the site footer (app/ds.css), on the
   design-system tokens of app/globals.css — web/lib/pay-page.test.mjs keeps
   every token below equal to globals.css. Fonts and the character come from
   our own /brand/; nothing here loads from another site. */

@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/brand/fonts/onest-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/brand/fonts/onest-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/brand/fonts/onest-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Unbounded";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/brand/fonts/unbounded-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Unbounded";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/brand/fonts/unbounded-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Unbounded";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/brand/fonts/unbounded-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ds-bg: #ffffff;
  --ds-surface: #ffffff;
  --ds-field: #f4f4f6;
  --ds-line: #ebebef;
  --ds-line-soft: #f2f2f5;
  --ds-ink: #121216;
  --ds-ink-2: #5d5d68;
  --ds-ink-3: #72727d;
  --ds-btn: #17171b;
  --ds-btn-ink: #ffffff;
  --ds-btn-hover: #2c2c33;
  --ds-accent: #db2777;
  --ds-on-accent: #ffffff;
  --ds-good: #15803d;
  --ds-danger: #c81e1e;
  --ds-danger-soft: rgba(200, 30, 30, 0.07);
  --ds-focus: var(--ds-accent);
  --ds-shadow-card: 0 1px 2px rgba(18, 18, 22, 0.04), 0 0 0 1px rgba(18, 18, 22, 0.04);
  --ds-shadow-lift: 0 14px 34px rgba(18, 18, 22, 0.09), 0 0 0 1px rgba(18, 18, 22, 0.05);
  --ds-font-ui: "Onest", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --ds-font-display: "Unbounded", "Onest", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ds-bg: #0c0c0f;
    --ds-surface: #141418;
    --ds-field: #1c1c21;
    --ds-line: #25252c;
    --ds-line-soft: #1d1d23;
    --ds-ink: #f3f3f5;
    --ds-ink-2: #a4a4ae;
    --ds-ink-3: #85858f;
    --ds-btn: #f3f3f5;
    --ds-btn-ink: #0c0c0f;
    --ds-btn-hover: #ffffff;
    --ds-accent: #ee5299;
    --ds-on-accent: #0c0c0f;
    --ds-good: #4ade80;
    --ds-danger: #f87171;
    --ds-danger-soft: rgba(248, 113, 113, 0.12);
    --ds-shadow-card: 0 0 0 1px rgba(255, 255, 255, 0.05);
    --ds-shadow-lift: 0 16px 36px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.07);
  }
}

/* The few resets the site gets from Tailwind's base */
*, ::before, ::after { box-sizing: border-box; border: 0 solid; }
* { -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: clip;
  background: var(--ds-bg);
  color: var(--ds-ink);
  font-family: var(--ds-font-ui);
  font-size: 15px;
  line-height: 1.45;
}
h1, p { margin: 0; }
h1 { font-size: inherit; font-weight: inherit; text-wrap: balance; }
img, svg { display: block; vertical-align: middle; }
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: inherit; }
button, input { font: inherit; color: inherit; margin: 0; padding: 0; line-height: inherit; }
button { background-color: transparent; background-image: none; cursor: pointer; text-transform: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ds-focus); outline-offset: 2px; }

/* ── The frame (AuthShell) ── */
.page {
  min-height: 100vh;
  background: var(--ds-bg);
  color: var(--ds-ink);
  font-family: var(--ds-font-ui);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  padding: clamp(28px, 9vh, 88px) 16px 40px;
}
.wrap { max-width: 400px; margin: 0 auto; display: grid; gap: 22px; }

.brand { display: grid; justify-items: center; gap: 10px; text-align: center; }
.mascot { width: 76px; height: 88px; object-fit: contain; animation: bob 3.2s ease-in-out infinite; user-select: none; }
.mascot.hop { animation: hop 0.7s cubic-bezier(0.3, 1.6, 0.5, 1); }
.word { font-family: var(--ds-font-display); font-weight: 600; font-size: 24px; letter-spacing: -0.02em; line-height: 1.1; }
.tagline { font-size: 14px; color: var(--ds-ink-2); margin-top: -4px; }

.card { background: var(--ds-surface); border-radius: 22px; box-shadow: var(--ds-shadow-card); padding: 26px; display: grid; gap: 18px; animation: rise 0.28s ease-out; }
.head { position: relative; display: grid; gap: 6px; }
.titleRow { display: flex; align-items: center; gap: 8px; }
.title { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; text-wrap: balance; }
.sub { font-size: 14px; color: var(--ds-ink-2); line-height: 1.5; }
.body { display: grid; gap: 18px; }
.body form { display: grid; gap: 18px; }

/* Text field (the card holder's name and phone, only if CloudPayments asks) */
.field { display: grid; gap: 8px; }
.label { font-size: 13.5px; font-weight: 500; color: var(--ds-ink-2); }
.input {
  height: 50px; width: 100%; padding: 0 16px; border-radius: 14px;
  background: var(--ds-field); border: 1.5px solid transparent; outline: none;
  font: inherit; font-size: 16px; color: var(--ds-ink);
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
}
.input::placeholder { color: var(--ds-ink-3); }
.input:focus { background: var(--ds-surface); border-color: var(--ds-ink); box-shadow: 0 0 0 4px var(--ds-line-soft); }

/* The graphite button (a link styled the same way, too) */
.btn {
  height: 48px; width: 100%; border-radius: 14px; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--ds-btn); color: var(--ds-btn-ink); font: inherit; font-weight: 600; font-size: 15px;
  transition: background 0.15s, transform 0.15s, color 0.15s;
}
.btn:hover { background: var(--ds-btn-hover); }
.btn:active { transform: scale(0.98); }
.btn:disabled { background: var(--ds-field); color: var(--ds-ink-3); cursor: default; transform: none; }
.btnLink { display: flex; align-items: center; justify-content: center; text-decoration: none; }

/* The unticked boxes: the offer and the separate autorenewal consent */
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: 14px; color: var(--ds-ink-2); line-height: 1.5; user-select: none; }
.checkInput { position: absolute; opacity: 0; width: 1px; height: 1px; }
.box {
  flex: none; width: 22px; height: 22px; margin-top: 1px; border-radius: 7px; border: 1.5px solid var(--ds-ink-3);
  display: grid; place-items: center; color: transparent; transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.checkInput:checked + .box { background: var(--ds-accent); border-color: var(--ds-accent); color: var(--ds-on-accent); }
.checkInput:focus-visible + .box { outline: 2px solid var(--ds-accent); outline-offset: 2px; }
.legal { margin: 0; font-size: 13px; line-height: 1.5; color: var(--ds-ink-3); }
.ds-doc-link { color: var(--ds-ink); font-weight: 500; text-decoration: underline; text-decoration-thickness: 1px; text-decoration-color: var(--ds-ink-3); text-underline-offset: 3px; overflow-wrap: anywhere; transition: text-decoration-color .15s; }
.ds-doc-link:hover { text-decoration-color: var(--ds-ink); }

.error { padding: 12px 14px; border-radius: 14px; background: var(--ds-danger-soft); color: var(--ds-danger); font-size: 13.5px; font-weight: 500; line-height: 1.45; animation: rise 0.18s ease-out; }
.status { min-height: 20px; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13.5px; color: var(--ds-ink-2); text-align: center; }

.progress { width: 120px; height: 4px; border-radius: 999px; background: var(--ds-line); overflow: hidden; position: relative; justify-self: center; }
.progress::after { content: ""; position: absolute; inset: 0; width: 40%; border-radius: 999px; background: var(--ds-accent); animation: slide 1.1s ease-in-out infinite; }

.page :focus-visible { outline: 2px solid var(--ds-accent); outline-offset: 2px; }
.page .input:focus-visible { outline: none; }

.animate-spin { animation: spin 1s linear infinite; }

@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-5px) rotate(2deg); } }
@keyframes hop { 0% { transform: translateY(0) scale(1); } 35% { transform: translateY(-12px) scale(1.06, 0.96); } 70% { transform: translateY(0) scale(0.97, 1.03); } 100% { transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .page *, .page *::before, .page *::after { animation: none !important; transition: none !important; }
}
@media (max-width: 420px) {
  .card { padding: 20px; }
}

/* ── The site footer: the documents and the seller (components/meta-disclaimer.tsx) ── */
.ds-footer { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; justify-items: center; padding: 40px 16px calc(32px + env(safe-area-inset-bottom)); text-align: center; }
.ds-footer p { margin: 0; max-width: 560px; font-size: 11.5px; line-height: 1.55; color: var(--ds-ink-3); }
.ds-footer a { color: inherit; }
.ds-footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; max-width: 560px; font-size: 12px; line-height: 1.5; }
.ds-footer-links a { color: var(--ds-ink-2); text-decoration: underline; text-decoration-color: var(--ds-line); text-underline-offset: 3px; }
.ds-footer-links a:hover { color: var(--ds-ink); }
