/*
 * DigiGO checkout page styles (payments.digigo.lt). Sizes, radii (24/16/14/10/999 px), 56 px
 * pay buttons, 16 px inputs and clamp() paddings are unchanged from the checkout this page was
 * copied from (see README.md); colours come from the tokens in :root; one family, Figtree, from
 * /assets/fonts.css. No third-party stylesheet.
 */

@keyframes digigoSpin { to { transform: rotate(360deg); } }

:root {
  /* Palette (lane contract §2.24) */
  --ink: #111827;
  --muted: #4B5563;
  --line: #E5E7EB;
  --bg: #F9FAFB;
  --card: #FFFFFF;
  --accent: #1E3A8A;
  --accent-hover: #1E40AF;
  --ok: #15803D;
  --err: #B91C1C;
  /* Derived tokens */
  --soft: #F3F4F6;
  --line-strong: #D1D5DB;
  --subtle: #6B7280;
  --placeholder: #9CA3AF;
  --accent-soft: #DBEAFE;
  --ok-soft: #DCFCE7;
  --on-accent: #FFFFFF;
  --focus-ring: rgba(30, 58, 138, 0.15);
  --warn-ink: #92400E;
  --warn-bg: #FEF3C7;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  font-family: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
p { text-wrap: pretty; }
input, button { font-family: inherit; }
::placeholder { color: var(--placeholder); }

/* ---------- Inline SVG icon sprite ---------- */
.co-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.co-icon {
  fill: currentColor;
  display: inline-block;
  flex: 0 0 auto;
  vertical-align: middle;
  width: 20px;
  height: 20px;
}
.co-icon--16 { width: 16px; height: 16px; }
.co-icon--18 { width: 18px; height: 18px; }
.co-icon--20 { width: 20px; height: 20px; }
.co-icon--22 { width: 22px; height: 22px; }
.co-icon--44 { width: 44px; height: 44px; }
.co-spin { animation: digigoSpin 0.9s linear infinite; }

/* ---------- Layout ---------- */
.co-main {
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(20px, 4vw, 40px) clamp(16px, 4vw, 24px) clamp(48px, 7vw, 88px);
}
[hidden] { display: none !important; }

/* ---------- Wordmark (text only until a DigiGO logo file exists) ---------- */
.co-brand { margin: 0 0 clamp(20px, 4vw, 36px); }
.co-wordmark {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--accent);
}

.co-head { max-width: 640px; }
.co-eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.co-h1 {
  margin: 10px 0 0;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  font-weight: 700;
  text-wrap: balance;
}
.co-lede {
  margin: 12px 0 0;
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.45;
  color: var(--muted);
}
.co-explainer {
  margin: 14px 0 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
}
.co-explainer a { color: var(--accent); text-decoration: underline; }

.co-columns {
  display: flex;
  flex-direction: row-reverse;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-start;
  margin-top: clamp(24px, 3vw, 36px);
}
.co-col-main {
  flex: 999 1 460px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ---------- Summary aside ---------- */
.co-summary {
  flex: 1 1 340px;
  min-width: 0;
  border-radius: 24px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
}
.co-summary__top {
  background: var(--accent);
  padding: clamp(20px, 3vw, 28px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.co-summary__kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-soft);
}
.co-summary__title {
  margin-top: 8px;
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--on-accent);
}
.co-summary__rows { display: flex; flex-direction: column; gap: 14px; }
.co-summary__row { display: flex; gap: 12px; align-items: flex-start; }
.co-summary__badge {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-soft);
}
.co-summary__rowtext { min-width: 0; }
.co-summary__label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}
.co-summary__value {
  margin-top: 3px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--on-accent);
  overflow-wrap: anywhere;
}
.co-summary__value--num { font-variant-numeric: tabular-nums; }
.co-summary__bottom {
  padding: clamp(20px, 3vw, 28px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.co-pricerow {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 15px;
  color: var(--muted);
}
.co-pricerow__amt {
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.co-divider { height: 1px; background: var(--line); }
.co-totalrow {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.co-totalrow__label { font-size: 16px; font-weight: 700; }
.co-totalrow__amt {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.co-secure {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  background: var(--soft);
  border-radius: 12px;
  padding: 11px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}
.co-statement { margin: 0; font-size: 13px; line-height: 1.5; color: var(--subtle); }

/* ---------- Cards ---------- */
.co-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: clamp(18px, 3vw, 32px);
}
.co-card__title {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 700;
}
.co-card__hint {
  margin: 8px 0 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
}

/* ---------- Payer rows ---------- */
.co-payer { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.co-field {
  background: var(--soft);
  border-radius: 14px;
  padding: 12px 12px 12px 16px;
}
.co-field__view { display: flex; align-items: center; gap: 12px; }
.co-field__viewtext { flex: 1; min-width: 0; }
.co-field__label { font-size: 13px; font-weight: 700; color: var(--muted); }
.co-field__value {
  margin-top: 2px;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.co-editbtn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 14px;
  border: none;
  border-radius: 999px;
  background: var(--card);
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.co-editbtn:hover { background: var(--accent-soft); }
.co-field__edit { display: flex; flex-direction: column; gap: 8px; }
.co-field__editrow { display: flex; flex-wrap: wrap; gap: 8px; }
.co-input {
  flex: 1 1 220px;
  min-width: 0;
  border: 1px solid var(--line-strong);
  background: var(--card);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 16px;
  color: var(--ink);
  outline: none;
}
.co-input:focus-visible,
.co-input.is-focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--focus-ring);
}
.co-input.is-invalid { border-color: var(--err); }
.co-editbtns { display: flex; gap: 6px; }
.co-btn-ghost {
  min-height: 46px;
  padding: 0 14px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.co-btn-ghost:hover { background: var(--line); }
.co-btn-solid {
  min-height: 46px;
  padding: 0 18px;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.co-btn-solid:hover { background: var(--accent-hover); }
.co-err { font-size: 13px; font-weight: 600; color: var(--err); }

/* ---------- Notice ---------- */
.co-notice {
  margin: 0 0 14px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--warn-ink);
  background: var(--warn-bg);
  border-radius: 12px;
  padding: 12px 14px;
}

/* ---------- Method tiles ---------- */
.co-methods { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.co-tile {
  position: relative;
  border-radius: 16px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.co-tile:hover { box-shadow: inset 0 0 0 1px var(--placeholder); }
.co-tile.is-selected { box-shadow: inset 0 0 0 2px var(--accent); }
.co-tile--probe {
  position: absolute;
  visibility: hidden;
  pointer-events: none;
}
.co-tile__btn {
  position: relative;
  width: 100%;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: clamp(10px, 2vw, 14px);
  border-radius: 16px;
  color: var(--ink);
}
.co-radio {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 2px var(--placeholder);
  display: inline-flex;
}
.co-tile.is-selected .co-radio { box-shadow: inset 0 0 0 7px var(--accent); }
.co-tile__icon {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent);
}
.co-tile__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.co-tile__name { font-size: 16px; font-weight: 700; line-height: 1.3; }
.co-tile__sub { font-size: 14px; line-height: 1.4; color: var(--muted); }
.co-tile__body {
  position: relative;
  margin: 0 16px;
  padding: 16px 0 18px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.co-tile__body--card { gap: 14px; }

/* pay buttons (56 px) */
.co-pay {
  width: 100%;
  min-height: 56px;
  padding: 0 24px;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.co-pay:hover { background: var(--accent-hover); }
.co-pay:disabled { opacity: 0.6; cursor: default; }
.co-pay__inner { display: inline-flex; align-items: center; gap: 10px; }
.co-pay--wallet { background: #000000; font-weight: 600; }
.co-pay--wallet:hover { background: #262626; }
.co-wallet-mock {
  width: 100%;
  min-height: 56px;
  padding: 0 24px;
  border: none;
  border-radius: 999px;
  background: #000000;
  color: #FFFFFF;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}
.co-foot {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  line-height: 1.5;
  color: var(--subtle);
}
.co-foot--top { align-items: flex-start; }
.co-foot .co-icon { color: var(--subtle); }
.co-bankcopy { margin: 0; font-size: 15px; line-height: 1.55; color: var(--muted); }

/* ---------- Stripe card fields ---------- */
.co-cardfield { display: flex; flex-direction: column; gap: 6px; }
.co-cardgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.co-stripe-mount {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: var(--card);
  border-radius: 10px;
  padding: 14px;
  outline: none;
}
.co-stripe-mount.StripeElement--focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--focus-ring);
}
.co-stripe-mount.StripeElement--invalid { border-color: var(--err); }
.co-express { width: 100%; min-height: 55px; }

.co-consent {
  margin: 18px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--subtle);
}
.co-consent a { color: var(--accent); text-decoration: underline; }

/* ---------- Full-screen states (loading, invalid, error, cancelled, expired, processing, paid) ---------- */
.co-screen {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: clamp(16px, 5vw, 48px);
}
.co-screen__badge {
  width: 76px;
  height: 76px;
  border-radius: 999px;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}
.co-screen__badge--spin { background: var(--card); box-shadow: inset 0 0 0 1px var(--line); color: var(--accent); }
.co-screen__badge--ok { background: var(--ok-soft); color: var(--ok); }
.co-screen__h1 {
  margin: 22px 0 0;
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  font-weight: 700;
  text-wrap: balance;
}
.co-screen__p {
  margin: 12px 0 0;
  font-size: 17px;
  line-height: 1.55;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.co-screen__p strong { color: var(--ink); }
.co-screen__btn {
  margin-top: 24px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: var(--on-accent);
  padding: 15px 26px;
  border: none;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}
.co-screen__btn:hover { background: var(--accent-hover); color: var(--on-accent); }

/* ---------- Receipt ---------- */
.co-receipt {
  margin-top: 28px;
  width: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 8px clamp(20px, 3vw, 28px);
  text-align: left;
}
.co-receipt + .co-screen__p { margin-top: 20px; }
.co-receipt__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.co-receipt__row--total {
  align-items: baseline;
  padding: 16px 0;
  border-bottom: none;
}
.co-receipt__k { font-size: 14px; color: var(--subtle); }
.co-receipt__v { font-size: 15px; font-weight: 700; color: var(--ink); }
.co-receipt__totalk { font-size: 15px; font-weight: 700; color: var(--ink); }
.co-receipt__totalv {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.co-noscript {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  font-size: 16px;
  color: var(--muted);
}
