/* ============================================================================
   IbejuPay PAYMENT GATEWAY — pay.ibejupay.com checkout design layer.
   Standalone, mobile-first, WCAG-AA, no framework. A focused, trust-forward
   bank-grade checkout (Paystack/Monnify feel) on the IbejuPay brand palette.
   ============================================================================ */

:root {
  --gw-navy:       #12244d;
  --gw-navy-deep:  #0e1a3c;
  --gw-navy-ink:   #12244d;
  --gw-sky:        #f26522;
  --gw-sky-strong: #d9531a;
  --gw-gold:       #fbb040;

  --gw-green:      #059669;
  --gw-green-bg:   #ecfdf5;
  --gw-red:        #dc2626;
  --gw-red-bg:     #fef2f2;
  --gw-amber:      #b45309;

  --gw-bg:         #eef3f9;
  --gw-surface:    #ffffff;
  --gw-border:     #dfe7f0;
  --gw-ink:        #16283f;
  --gw-muted:      #5a6b81;
  --gw-faint:      #8fa0b5;

  --gw-radius:     16px;
  --gw-radius-sm:  10px;
  --gw-shadow:     0 1px 3px rgba(13,31,56,.07), 0 1px 2px rgba(13,31,56,.05);
  --gw-shadow-md:  0 10px 30px -8px rgba(13,31,56,.16);
  --gw-shadow-lg:  0 30px 60px -22px rgba(13,31,56,.34);
  --gw-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body.gw-body {
  margin: 0; font-family: var(--gw-font); font-size: 15.5px; line-height: 1.6;
  color: var(--gw-ink);
  background:
    radial-gradient(1200px 480px at 50% -220px, rgba(14,165,233,.10), transparent 70%),
    var(--gw-bg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  display: flex; flex-direction: column; min-height: 100vh;
}
h1,h2,h3 { margin: 0; line-height: 1.2; }
p { margin: 0 0 12px; }
a { color: var(--gw-sky-strong); text-decoration: none; }
a:hover { color: var(--gw-navy); }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--gw-sky-strong); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

.gw-wrap { width: 100%; max-width: 560px; margin: 0 auto; padding: 0 18px; min-width: 0; }
.gw-card, .gw-pay__wait, .gw-pay__head, .gw-pay__lead, .gw-acct { min-width: 0; overflow-wrap: break-word; }

/* ── Header ──────────────────────────────────────────────────────────────── */
.gw-header {
  background: var(--gw-navy-deep);
  padding-top: env(safe-area-inset-top, 0px);
}
.gw-header__row { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.gw-brand { display: flex; align-items: center; gap: 10px; color: #fff; }
.gw-brand:hover { color: #fff; }
.gw-brand__mark { width: 34px; height: 34px; border-radius: 9px; background: #fff; display: grid; place-items: center; overflow: hidden; flex: none; }
.gw-brand__mark img { width: 28px; height: 28px; object-fit: contain; }
.gw-brand__text { font-weight: 800; font-size: 16px; letter-spacing: -.01em; display: flex; flex-direction: column; line-height: 1.15; }
.gw-brand__text small { font-weight: 500; font-size: 10.5px; color: #9db4d0; text-transform: uppercase; letter-spacing: .04em; }
.gw-secured { display: flex; align-items: center; gap: 6px; color: #a7f3d0; font-size: 12.5px; font-weight: 600; }
.gw-secured svg { color: #6ee7b7; }

/* ── Main ────────────────────────────────────────────────────────────────── */
.gw-main { flex: 1; padding: 30px 0 44px; }

/* ── Hero (landing) ──────────────────────────────────────────────────────── */
.gw-hero { text-align: center; margin-bottom: 22px; }
.gw-hero__eyebrow {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em; color: var(--gw-sky-strong);
  background: #fff; border: 1px solid var(--gw-border); padding: 6px 13px; border-radius: 999px;
  box-shadow: var(--gw-shadow);
}
.gw-hero__eyebrow svg { color: var(--gw-sky-strong); }
.gw-hero__title { font-size: clamp(26px, 6vw, 34px); font-weight: 900; letter-spacing: -.025em; margin: 16px 0 8px; }
.gw-hero__sub { color: var(--gw-muted); font-size: 15px; max-width: 460px; margin: 0 auto; }

/* ── Card ────────────────────────────────────────────────────────────────── */
.gw-card {
  background: var(--gw-surface); border: 1px solid var(--gw-border); border-radius: var(--gw-radius);
  box-shadow: var(--gw-shadow-md); padding: 22px; margin-bottom: 18px;
}
.gw-card--lead { padding-top: 8px; }
.gw-card--center { text-align: center; }

/* ── Tabs ────────────────────────────────────────────────────────────────── */
.gw-tabs { display: flex; gap: 4px; background: #f1f5fa; border-radius: 12px; padding: 5px; margin: 14px 0 20px; }
.gw-tab {
  flex: 1; border: 0; background: transparent; font: inherit; font-weight: 600; font-size: 14px;
  color: var(--gw-muted); padding: 10px 8px; border-radius: 9px; cursor: pointer; transition: .15s;
}
.gw-tab.is-active { background: #fff; color: var(--gw-navy); box-shadow: var(--gw-shadow); }
.gw-pane { display: none; }
.gw-pane.is-active { display: block; animation: gw-fade .25s ease; }
@keyframes gw-fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ── Fields ──────────────────────────────────────────────────────────────── */
.gw-field { display: block; margin-bottom: 16px; }
.gw-field__label { display: block; font-size: 13.5px; font-weight: 600; color: var(--gw-navy-ink); margin-bottom: 7px; }
.gw-field__label small { color: var(--gw-faint); font-weight: 500; }
.gw-field__hint { display: block; font-size: 12.5px; color: var(--gw-faint); margin-top: 6px; }
.gw-field-row { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 12px; }
.gw-input {
  width: 100%; font: inherit; font-size: 15px; color: var(--gw-ink);
  background: #fff; border: 1.5px solid var(--gw-border); border-radius: var(--gw-radius-sm);
  padding: 12px 14px; transition: border-color .15s, box-shadow .15s;
}
.gw-input:focus { outline: 0; border-color: var(--gw-sky); box-shadow: 0 0 0 3px rgba(14,165,233,.15); }
.gw-input--lg { font-size: 17px; padding: 14px 16px; }
select.gw-input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%235a6b81' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 40px; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.gw-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 700; font-size: 15px; cursor: pointer;
  border: 1.5px solid transparent; border-radius: var(--gw-radius-sm); padding: 12px 20px;
  transition: transform .06s, background .15s, box-shadow .15s;
}
.gw-btn:active { transform: translateY(1px); }
.gw-btn--primary { background: var(--gw-sky-strong); color: #fff; box-shadow: 0 8px 20px -8px rgba(2,132,199,.6); }
.gw-btn--primary:hover { background: #0270ab; color: #fff; }
.gw-btn--outline { background: #fff; color: var(--gw-navy); border-color: var(--gw-border); }
.gw-btn--outline:hover { border-color: var(--gw-navy); color: var(--gw-navy); }
.gw-btn--block { width: 100%; }
.gw-btn--lg { padding: 15px 24px; font-size: 16px; border-radius: 12px; }
.gw-btn[disabled] { opacity: .6; cursor: default; }

.gw-back { display: inline-flex; align-items: center; gap: 5px; color: var(--gw-muted); font-size: 13.5px; font-weight: 600; margin-bottom: 14px; }
.gw-back:hover { color: var(--gw-navy); }

/* ── Alerts ──────────────────────────────────────────────────────────────── */
.gw-alert { display: flex; align-items: flex-start; gap: 10px; border-radius: var(--gw-radius-sm); padding: 13px 15px; font-size: 14px; margin-bottom: 16px; }
.gw-alert svg { flex: none; margin-top: 1px; }
.gw-alert--error { background: var(--gw-red-bg); color: #991b1b; border: 1px solid #fecaca; }
.gw-alert--error svg { color: var(--gw-red); }

/* ── Assurance strip ─────────────────────────────────────────────────────── */
.gw-assure { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.gw-assure__item { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; background: rgba(255,255,255,.6); border: 1px solid var(--gw-border); border-radius: 12px; padding: 16px 10px; }
.gw-assure__item svg { color: var(--gw-sky-strong); }
.gw-assure__item > div { display: flex; flex-direction: column; gap: 3px; }
.gw-assure__item b { display: block; font-size: 13px; }
.gw-assure__item span { display: block; font-size: 11.8px; color: var(--gw-muted); line-height: 1.45; }

/* ── Summary (checkout) ──────────────────────────────────────────────────── */
.gw-summary { background: linear-gradient(135deg, var(--gw-navy) 0%, var(--gw-navy-deep) 100%); color: #fff; border-radius: 12px; padding: 18px 20px; margin-bottom: 22px; }
.gw-summary__row { display: flex; justify-content: space-between; gap: 14px; font-size: 13.5px; padding: 3px 0; }
.gw-summary__label { color: #a9c0dc; }
.gw-summary__val { font-weight: 600; text-align: right; }
.gw-summary__amount { display: flex; align-items: baseline; justify-content: space-between; margin-top: 12px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.14); }
.gw-summary__amount .gw-summary__label { color: #c3d5ec; font-size: 13px; }
.gw-summary__amount b { font-size: 27px; font-weight: 800; letter-spacing: -.01em; }

.gw-form__h { font-size: 14px; font-weight: 700; color: var(--gw-navy-ink); margin: 20px 0 12px; }
.gw-form__note { font-size: 13px; color: var(--gw-muted); margin: -6px 0 12px; }
.gw-form__legal { font-size: 12px; color: var(--gw-faint); text-align: center; margin: 12px 0 0; }

/* ── Bank choice ─────────────────────────────────────────────────────────── */
.gw-banks { display: flex; flex-direction: column; gap: 10px; }
.gw-bank { display: block; cursor: pointer; }
.gw-bank input { position: absolute; opacity: 0; pointer-events: none; }
.gw-bank__body { display: flex; align-items: center; gap: 13px; border: 1.5px solid var(--gw-border); border-radius: 12px; padding: 14px 15px; transition: border-color .15s, background .15s; }
.gw-bank:hover .gw-bank__body { border-color: #bcd0e6; }
.gw-bank input:checked + .gw-bank__body { border-color: var(--gw-sky); background: #f0f9ff; box-shadow: 0 0 0 3px rgba(14,165,233,.12); }
.gw-bank input:focus-visible + .gw-bank__body { outline: 2px solid var(--gw-sky-strong); outline-offset: 2px; }
.gw-bank__logo { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: 19px; color: #fff; flex: none; }
.gw-bank__logo--fidelity { background: linear-gradient(135deg,#1a7a4a,#0f5c37); }
.gw-bank__logo--access { background: linear-gradient(135deg,#e35205,#b8420a); }
/* When an official logo image is present, show it on a clean white tile. */
.gw-bank__logo--img { background: #fff; border: 1px solid var(--gw-border); padding: 4px; overflow: hidden; }
.gw-bank__logo--img img { width: 100%; height: 100%; object-fit: contain; }
/* The bank badge inside the account header is compact. */
.gw-acct__bank .gw-bank__logo { width: 26px; height: 26px; border-radius: 6px; font-size: 13px; }
.gw-acct__bank .gw-bank__logo--img { padding: 2px; }
.gw-bank__text { flex: 1; display: flex; flex-direction: column; line-height: 1.3; }
.gw-bank__text b { font-size: 15px; }
.gw-bank__text small { font-size: 12.5px; color: var(--gw-muted); }
.gw-bank__tick { color: var(--gw-sky-strong); opacity: 0; transition: opacity .15s; }
.gw-bank input:checked + .gw-bank__body .gw-bank__tick { opacity: 1; }

/* ── Pay / transfer page ─────────────────────────────────────────────────── */
.gw-pay__head { text-align: center; margin-bottom: 20px; }
.gw-pay__badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--gw-amber); background: #fffbeb; border: 1px solid #fde68a; padding: 5px 12px; border-radius: 999px; }
.gw-pay__amount { font-size: clamp(28px, 9vw, 38px); font-weight: 900; letter-spacing: -.02em; margin: 14px 0 6px; }
.gw-pay__lead { font-size: 14.5px; color: var(--gw-muted); max-width: 400px; margin: 0 auto; }

.gw-acct { border: 2px dashed #bcd0e6; border-radius: 14px; background: #f7fbff; padding: 18px; text-align: center; margin-bottom: 18px; }
.gw-acct__bank { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--gw-navy); margin-bottom: 10px; }
.gw-acct__banklogo { width: 24px; height: 24px; border-radius: 6px; background: var(--gw-navy); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.gw-acct__no { display: inline-flex; align-items: center; gap: 12px; background: #fff; border: 1.5px solid var(--gw-border); border-radius: 12px; padding: 12px 16px; cursor: pointer; font: inherit; transition: border-color .15s, box-shadow .15s; }
.gw-acct__no:hover { border-color: var(--gw-sky); box-shadow: var(--gw-shadow); }
.gw-acct__no .num { font-size: 27px; font-weight: 800; letter-spacing: .04em; color: var(--gw-navy-ink); }
.gw-acct__copy { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700; color: var(--gw-sky-strong); }
.gw-acct__copy.is-copied { color: var(--gw-green); }
.gw-acct__name { font-size: 13px; color: var(--gw-muted); margin-top: 10px; font-weight: 500; }

.gw-pay__status { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--gw-navy); background: #eff6ff; border: 1px solid #dbeafe; border-radius: 10px; padding: 12px; margin-bottom: 14px; }
.gw-spinner { width: 16px; height: 16px; border: 2.5px solid #bfdbfe; border-top-color: var(--gw-sky-strong); border-radius: 50%; animation: gw-spin .8s linear infinite; flex: none; }
@keyframes gw-spin { to { transform: rotate(360deg); } }

.gw-pay__expiry { text-align: center; font-size: 13px; color: var(--gw-muted); margin-bottom: 16px; }
.gw-pay__expiry b { color: var(--gw-amber); font-variant-numeric: tabular-nums; }

.gw-steps { margin: 0 0 6px; padding-left: 20px; }
.gw-steps li { font-size: 13.5px; color: #35485f; line-height: 1.5; margin-bottom: 8px; }
.gw-pay__ref { text-align: center; font-size: 12.5px; color: var(--gw-faint); margin-top: 14px; }

.gw-pay__done { text-align: center; padding: 14px 4px; animation: gw-fade .35s ease; }
.gw-pay__check { color: var(--gw-green); margin-bottom: 8px; }
.gw-pay__done h1 { font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.gw-pay__done p { color: var(--gw-muted); font-size: 14.5px; max-width: 380px; margin: 0 auto 20px; }

.gw-help { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; color: var(--gw-muted); background: rgba(255,255,255,.6); border: 1px solid var(--gw-border); border-radius: 12px; padding: 13px 15px; }
.gw-help svg { flex: none; color: var(--gw-faint); margin-top: 1px; }

/* ── Receipt ─────────────────────────────────────────────────────────────── */
.gw-receipt { background: #fff; border: 1px solid var(--gw-border); border-radius: var(--gw-radius); box-shadow: var(--gw-shadow-md); overflow: hidden; }
.gw-receipt__band { display: flex; align-items: center; gap: 14px; background: var(--gw-green-bg); border-bottom: 1px solid #a7f3d0; padding: 20px 22px; color: #065f46; }
.gw-receipt__band svg { color: var(--gw-green); flex: none; }
.gw-receipt__band b { display: block; font-size: 17px; }
.gw-receipt__band span { font-size: 13px; }
.gw-receipt__amount { text-align: center; padding: 24px 20px 18px; }
.gw-receipt__amount span { display: block; font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--gw-faint); font-weight: 600; margin-bottom: 6px; }
.gw-receipt__amount b { font-size: 34px; font-weight: 900; letter-spacing: -.02em; color: var(--gw-navy-ink); }
.gw-receipt__meta { margin: 0; padding: 6px 22px 8px; }
.gw-receipt__meta > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px dashed var(--gw-border); font-size: 13.8px; }
.gw-receipt__meta dt { color: var(--gw-muted); margin: 0; }
.gw-receipt__meta dd { margin: 0; font-weight: 600; text-align: right; color: var(--gw-ink); }
.gw-receipt__actions { display: flex; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--gw-border); }
.gw-receipt__actions .gw-btn { flex: 1; }
.gw-receipt__foot { font-size: 12px; color: var(--gw-faint); text-align: center; padding: 0 22px 18px; margin: 0; }

/* ── Empty / error ───────────────────────────────────────────────────────── */
.gw-empty { padding: 24px 10px; }
.gw-empty__ic { display: inline-grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: #fff7ed; color: var(--gw-amber); margin-bottom: 14px; }
.gw-empty h1 { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.gw-empty p { color: var(--gw-muted); font-size: 14.5px; max-width: 360px; margin: 0 auto 18px; }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.gw-footer { background: transparent; padding: 8px 0 calc(26px + env(safe-area-inset-bottom, 0px)); }
.gw-footer__row { text-align: center; }
.gw-footer__banks { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--gw-muted); margin-bottom: 8px; }
.gw-footer__banks b { color: var(--gw-navy); font-weight: 700; }
.gw-footer__banks i { color: var(--gw-faint); font-style: normal; }
.gw-footer__note { font-size: 11.8px; color: var(--gw-faint); max-width: 460px; margin: 0 auto; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 420px) {
  .gw-field-row { grid-template-columns: 1fr; }
  .gw-assure { grid-template-columns: 1fr; }
  .gw-assure__item { flex-direction: row; text-align: left; align-items: center; }
  .gw-acct__no .num { font-size: 23px; }
  .gw-receipt__actions { flex-direction: column; }
}

/* ── Print (receipt) ─────────────────────────────────────────────────────── */
@media print {
  .gw-header, .gw-footer, .gw-receipt__actions, .gw-help { display: none !important; }
  body.gw-body { background: #fff; }
  .gw-receipt { box-shadow: none; border: 1px solid #ccc; }
}
