/* The payware link page, in payware.eu's look (website/payware-site/src/styles/global.css): Varela Round,
   with Nunito for Bulgarian and any Cyrillic text, Tailwind's grays, the #6c90ff accent and the site's
   buttons and cards. Light only, as the site is. The fonts are copies of the site's own files, served
   from /link-page/fonts/, so the page still loads nothing from another host. */

@font-face {
  font-family: 'Varela Round';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/varela-round-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: 'Varela Round';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/varela-round-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/nunito-400-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: 'Nunito';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/nunito-400-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root {
  --bg: #f9fafb;          /* gray-50, the site's section background */
  --card: #ffffff;
  --text: #1c1c1c;        /* the site's body text */
  --heading: #101828;     /* gray-900 */
  --muted: #4a5565;       /* gray-600 */
  --faint: #6a7282;       /* gray-500 */
  --line: #e5e7eb;        /* gray-200 */
  --line-strong: #d1d5dc; /* gray-300 */
  --hover: #f3f4f6;       /* gray-100 */
  --primary: #364153;     /* gray-700, the site's primary button */
  --primary-hover: #1e2939; /* gray-800 */
  --accent: #6c90ff;      /* payware blue: focus, spinner, links */
  --ok: #016630;          /* green-800 */
  --ok-bg: #dcfce7;       /* green-100 */
  --bad: #c34747;         /* the site's pastel red, darkest step */
  --bad-bg: #fff5f5;
  --warn: #894b00;        /* yellow-800 */
  --warn-bg: #fefce8;     /* yellow-50 */
  --font: 'Varela Round', 'Nunito', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 16px;
}

/* Varela Round has no Cyrillic, so Bulgarian pages use Nunito, as on payware.eu. */
html[lang="bg"] body { font-family: 'Nunito', system-ui, -apple-system, sans-serif; }

.banner {
  width: 100%;
  max-width: 440px;
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--warn-bg);
  color: var(--warn);
  font-size: 14px;
  text-align: center;
}

.card {
  width: 100%;
  max-width: 440px;
  margin-top: 16px;
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
}

.brand { display: flex; justify-content: center; margin-bottom: 20px; }

.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

.payee { text-align: center; margin-bottom: 14px; }
.payee-name {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--heading);
  overflow-wrap: anywhere;
}
.payee-legal { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }

.badge {
  display: inline-block;
  margin-top: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 13px;
}
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.no { background: var(--bad-bg); color: var(--bad); }

.amount {
  text-align: center;
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--heading);
  margin: 8px 0 4px;
  overflow-wrap: anywhere;
}

.reason { text-align: center; color: var(--muted); overflow-wrap: anywhere; }

.product-image {
  display: block;
  max-width: 100%;
  max-height: 200px;
  margin: 0 auto 12px;
  border-radius: 8px;
}

.basket { margin: 12px 0 0; border-top: 1px solid var(--line); }
.basket-row, .basket-total {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.basket-name { color: var(--text); }
.basket-qty { display: block; font-size: 14px; color: var(--muted); }
.basket-amount { white-space: nowrap; }
.basket-total { font-weight: 700; color: var(--heading); font-size: 1.15rem; }

.countdown { text-align: center; margin: 10px 0 0; font-size: 15px; color: var(--muted); }

.actions { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; }

/* The site's large button: font-medium, rounded-lg, px-5 py-3, primary gray-700, secondary white. */
.button {
  display: block;
  width: 100%;
  padding: 12px 20px;
  border: 1px solid var(--primary);
  border-radius: 8px;
  background: var(--primary);
  color: #ffffff;
  font: inherit;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.button.secondary { background: var(--card); color: var(--heading); border-color: var(--line-strong); }
.button.secondary:hover { background: var(--hover); }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(108, 144, 255, 0.1);
}

.hint {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--warn-bg);
  color: var(--warn);
  font-size: 14px;
}

.outcome { text-align: center; padding: 8px 0; }
.outcome-mark {
  width: 64px;
  height: 64px;
  margin: 0 auto 10px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  font-weight: 700;
}
.outcome-mark.ok { background: var(--ok-bg); color: var(--ok); }
.outcome-mark.no { background: var(--bad-bg); color: var(--bad); }
.outcome-mark.wait { background: var(--hover); color: var(--faint); }
.outcome-title { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.025em; color: var(--heading); }

.spinner {
  width: 28px;
  height: 28px;
  margin: 0 auto;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }

.qr { margin-top: 20px; text-align: center; }
.qr img { width: 220px; height: 220px; background: #ffffff; padding: 8px; border: 1px solid var(--line); border-radius: 8px; }
.qr .link { font-size: 13px; color: var(--faint); overflow-wrap: anywhere; }

.foot {
  width: 100%;
  max-width: 440px;
  margin: 14px 0 24px;
  font-size: 13px;
  color: var(--faint);
  text-align: center;
}

/* The language switcher, as in payware.eu's footer. Български falls back to Nunito on an English
   or Spanish page, which has the Cyrillic Varela Round lacks. */
.langs { margin-top: 10px; font-size: 14px; }
.langs a { color: var(--muted); text-decoration: none; padding: 4px 2px; }
.langs a:hover { color: var(--heading); text-decoration: underline; }
.langs .current { color: var(--heading); }

/* Delivery details form and the session's address (spec section 23). Inputs are 16px so a phone does
   not zoom in on focus; min-width 0 keeps long values from widening the card. */
.form-title { margin: 20px 0 8px; font-size: 1.15rem; font-weight: 700; letter-spacing: -0.025em; color: var(--heading); }
.field { margin-top: 12px; }
.field label { display: block; margin-bottom: 4px; font-size: 14px; color: var(--muted); }
.field .optional { color: var(--faint); }
.field input, .field select {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
  font: inherit;
  font-size: 16px;
}
.field input:focus-visible, .field select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  box-shadow: 0 0 0 4px rgba(108, 144, 255, 0.1);
}
.delivery-form .muted.small { margin: 8px 0 0; }
.price-box { margin-top: 16px; }
.price-lines.checking { opacity: 0.6; }
.hint.error { background: var(--bad-bg); color: var(--bad); }
.button:disabled, .button[aria-disabled="true"] { opacity: 0.5; cursor: default; pointer-events: none; }
.privacy { margin-top: 16px; }
.privacy a { color: var(--accent); }

.address { margin-top: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.address-title { font-size: 14px; color: var(--muted); margin-bottom: 2px; }
.address-line { overflow-wrap: anywhere; }
