/* ============================================================================
   China Kanta — payment surfaces.

   Three jobs. One: the checkout page's payment method picker, which now has rails
   (mobile money networks, card) and must look like a choice the customer is
   confident enough to hand their money to. Two: the status screen a payment
   lands on afterwards, which has to hold somebody's attention through a mobile
   money prompt without making them believe the app has lost their money. Three:
   the box a Mobile Money number is typed into, which had been reporting-text
   weight and is now the loudest thing in its card.

   Written by hand rather than with utility classes: the production host has no
   node, so public/build is a committed bundle that cannot gain new Tailwind.
   New filename on purpose — the edge cache holds a CSS URL for seven days.
   ========================================================================== */

:root {
    --ckp-red: #e62129;
    --ckp-red-ink: #b3161d;
    --ckp-red-wash: #fff4f4;
    --ckp-ink: #101012;
    --ckp-ink-soft: #6b6b73;
    --ckp-line: #e9e9ef;
    --ckp-ok: #12a150;
    --ckp-ok-wash: #eefaf2;
    --ckp-bad: #d92d20;
    --ckp-bad-wash: #fff2f0;
    --ckp-warn: #b54708;
    --ckp-warn-wash: #fff6ec;
}

/* ============================================================================
   1. CHECKOUT — payment method picker
   ========================================================================== */

/* The rails inside Paystack. Each one is a tappable tile, not a radio in a
   list, because a phone thumb misses a 16px radio and never misses a 64px
   tile.

   One per row until there is real room for two. A `1fr` track is `minmax(auto, 1fr)`,
   so its floor is the tile's own min-content — badge, gaps, tick and padding — and two of
   those floors are wider than the checkout panel on a phone. The grid then sizes the tracks
   anyway and the second tile walks off the screen. `minmax(0, 1fr)` removes the floor, and
   stacking below 640px gives each method the full width its label needs. */
.ckp-rails {
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr);
    margin-top: 4px;
}

@media (min-width: 640px) {
    .ckp-rails {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }
}

.ckp-rail {
    -webkit-tap-highlight-color: transparent;
    align-items: center;
    background: #fff;
    border: 1.5px solid var(--ckp-line);
    border-radius: 18px;
    display: flex;
    gap: 12px;
    min-height: 72px;
    padding: 14px;
    position: relative;
    text-align: left;
    transition:
        border-color .18s ease,
        background-color .18s ease,
        box-shadow .18s ease,
        transform .12s ease;
    width: 100%;
}

.ckp-rail:active {
    transform: scale(.985);
}

.ckp-rail[data-selected="1"] {
    background: var(--ckp-red-wash);
    border-color: var(--ckp-red);
    box-shadow: 0 6px 20px -12px rgb(230 33 41 / 55%);
}

.ckp-rail-badge {
    align-items: center;
    background: #f2f2f6;
    border-radius: 12px;
    color: var(--ckp-ink);
    display: flex;
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 800;
    height: 40px;
    justify-content: center;
    letter-spacing: .02em;
    min-width: 40px;
    padding: 0 8px;
    transition: background-color .18s ease, color .18s ease;
}

.ckp-rail[data-selected="1"] .ckp-rail-badge {
    background: var(--ckp-red);
    color: #fff;
}

.ckp-rail-name {
    color: var(--ckp-ink);
    display: block;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.25;
}

.ckp-rail-hint {
    color: var(--ckp-ink-soft);
    display: block;
    font-size: 12px;
    line-height: 1.35;
    margin-top: 2px;
}

.ckp-rail-tick {
    color: var(--ckp-red);
    flex-shrink: 0;
    height: 18px;
    opacity: 0;
    transition: opacity .18s ease;
    width: 18px;
}

.ckp-rail[data-selected="1"] .ckp-rail-tick {
    opacity: 1;
}

/* The networks, one tap under the rail they belong to. */
.ckp-networks {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.ckp-network {
    -webkit-tap-highlight-color: transparent;
    background: #fff;
    border: 1.5px solid var(--ckp-line);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    padding: 9px 14px;
    transition:
        border-color .16s ease,
        background-color .16s ease,
        color .16s ease,
        transform .12s ease;
}

.ckp-network:active {
    transform: scale(.97);
}

.ckp-network[data-selected="1"] {
    background: var(--ckp-ink);
    border-color: var(--ckp-ink);
    color: #fff;
}

/* Slides the phone-number row in instead of snapping it, which is the
   difference between a form and a conversation. */
.ckp-reveal {
    animation: ckp-reveal .26s cubic-bezier(.22, 1, .36, 1) both;
}

@keyframes ckp-reveal {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.ckp-field-label {
    color: var(--ckp-ink);
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 6px;
}

.ckp-field-hint {
    color: var(--ckp-ink-soft);
    font-size: 12px;
    margin-top: 6px;
}

/* The line that keeps the promise honest: the money leaves China Kanta's page
   only for the payment, and comes straight back. */
.ckp-secure {
    align-items: flex-start;
    background: var(--ckp-ok-wash);
    border: 1px solid #cdeed9;
    border-radius: 16px;
    color: #0b6b36;
    display: flex;
    font-size: 12.5px;
    gap: 10px;
    line-height: 1.45;
    margin-top: 14px;
    padding: 12px 14px;
}

.ckp-secure svg {
    flex-shrink: 0;
    height: 18px;
    width: 18px;
}

/* A session the customer walked away from, found again on the page that would
   otherwise let them order the same things twice. */
.ckp-resume {
    background: var(--ckp-warn-wash);
    border: 1px solid #f5d7b0;
    border-radius: 18px;
    margin-bottom: 20px;
    padding: 14px 16px;
}

.ckp-resume p {
    color: var(--ckp-warn);
    font-size: 13.5px;
    line-height: 1.5;
}

.ckp-resume a {
    background: var(--ckp-ink);
    border-radius: 12px;
    color: #fff;
    display: inline-block;
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 800;
    padding: 10px 14px;
    text-decoration: none;
    transition: transform .12s ease, opacity .18s ease;
}

.ckp-resume a:active {
    transform: scale(.97);
}

.ckp-resume-row {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

/* ============================================================================
   2. STATUS SCREEN
   ========================================================================== */

.ckp-stage {
    background: #fff;
    display: flex;
    justify-content: center;
    min-height: calc(100vh - 56px);
    padding: 20px 14px calc(28px + env(safe-area-inset-bottom, 0px) + 76px);
}

@media (min-width: 768px) {
    .ckp-stage {
        min-height: calc(100vh - 72px);
        padding: 40px 24px 64px;
    }
}

.ckp-card {
    animation: ckp-rise .32s cubic-bezier(.22, 1, .36, 1) both;
    background: #fff;
    border: 1px solid var(--ckp-line);
    border-radius: 26px;
    box-shadow: 0 24px 60px -44px rgb(16 16 18 / 34%);
    max-width: 560px;
    padding: 28px 22px 24px;
    width: 100%;
}

@media (min-width: 768px) {
    .ckp-card {
        padding: 36px 38px 30px;
    }
}

@keyframes ckp-rise {
    from {
        opacity: 0;
        transform: translateY(10px) scale(.99);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.ckp-hero {
    align-items: center;
    display: flex;
    flex-direction: column;
    padding-bottom: 22px;
    text-align: center;
}

.ckp-title {
    color: var(--ckp-ink);
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -.01em;
    line-height: 1.2;
    margin-top: 18px;
}

.ckp-hero--ok .ckp-title {
    color: var(--ckp-ok);
    font-size: 26px;
}

.ckp-hero--bad .ckp-title {
    color: var(--ckp-bad);
}

.ckp-subtitle {
    color: var(--ckp-ink-soft);
    font-size: 14.5px;
    line-height: 1.55;
    margin-top: 8px;
    max-width: 42ch;
}

.ckp-mark {
    align-items: center;
    border-radius: 50%;
    display: flex;
    height: 74px;
    justify-content: center;
    width: 74px;
}

.ckp-mark svg {
    height: 34px;
    width: 34px;
}

.ckp-mark--ok {
    animation: ckp-pop .45s cubic-bezier(.2, 1.4, .4, 1) both;
    background: var(--ckp-ok-wash);
    color: var(--ckp-ok);
}

.ckp-mark--bad {
    background: var(--ckp-bad-wash);
    color: var(--ckp-bad);
}

@keyframes ckp-pop {
    from {
        opacity: 0;
        transform: scale(.6);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* The spinner is a ring, not a bar: a bar reads as "loading a page", a ring
   reads as "waiting for you", which is exactly the state a MoMo prompt is. */
.ckp-ring {
    animation: ckp-spin 1.15s linear infinite;
    border: 3px solid var(--ckp-line);
    border-top-color: var(--ckp-red);
    border-radius: 50%;
    height: 58px;
    width: 58px;
}

@keyframes ckp-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .ckp-ring,
    .ckp-card,
    .ckp-mark--ok,
    .ckp-reveal {
        animation: none;
    }
}

.ckp-amount {
    align-items: baseline;
    background: var(--ckp-red-wash);
    border: 1px solid #f7d3d5;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    justify-content: center;
    margin-bottom: 18px;
    padding: 14px 16px;
    text-align: center;
}

.ckp-amount span {
    color: var(--ckp-red-ink);
    font-size: 26px;
    font-weight: 900;
    letter-spacing: -.02em;
}

.ckp-amount em {
    color: var(--ckp-ink-soft);
    font-size: 12.5px;
    font-style: normal;
    font-weight: 700;
}

.ckp-steps {
    background: #fafafc;
    border: 1px solid var(--ckp-line);
    border-radius: 18px;
    margin-bottom: 18px;
    padding: 14px 16px 16px;
}

.ckp-steps-title {
    color: var(--ckp-ink);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .06em;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.ckp-steps ol {
    color: var(--ckp-ink-soft);
    font-size: 13.5px;
    line-height: 1.6;
    margin: 0;
    padding-left: 20px;
}

.ckp-steps li + li {
    margin-top: 4px;
}

.ckp-steps strong {
    color: var(--ckp-ink);
}

/* Rows, not prose: the customer scans for the number they recognise. */
.ckp-facts {
    border-top: 1px solid var(--ckp-line);
    display: grid;
    gap: 0;
    margin: 0 0 18px;
}

.ckp-fact {
    align-items: center;
    border-bottom: 1px solid var(--ckp-line);
    display: flex;
    gap: 14px;
    justify-content: space-between;
    padding: 12px 2px;
}

.ckp-fact dt {
    color: var(--ckp-ink-soft);
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 600;
}

.ckp-fact dd {
    color: var(--ckp-ink);
    font-size: 13.5px;
    font-weight: 700;
    margin: 0;
    text-align: right;
    word-break: break-word;
}

.ckp-strong {
    color: var(--ckp-red-ink) !important;
    font-size: 15px !important;
    font-weight: 900 !important;
}

.ckp-mono {
    /* Paystack references are read out loud to support, so they must be
       legible character by character, not justified. */
    font-feature-settings: "tnum" 1;
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    font-size: 12.5px !important;
    letter-spacing: .01em;
}

.ckp-count {
    background: var(--ckp-ink);
    border-radius: 10px;
    color: #fff;
    display: inline-block;
    font-feature-settings: "tnum" 1;
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    min-width: 62px;
    padding: 4px 8px;
    text-align: center;
}

.ckp-note {
    background: #fafafc;
    border: 1px solid var(--ckp-line);
    border-radius: 14px;
    color: var(--ckp-ink-soft);
    font-size: 13px;
    line-height: 1.5;
    margin: 0 0 16px;
    padding: 11px 13px;
}

.ckp-note--warn {
    background: var(--ckp-warn-wash);
    border-color: #f5d7b0;
    color: var(--ckp-warn);
}

/*
 | The "paid in full" card a guest sees on their order page. It is .ckp-note in green, but it
 | carries its own margin and radius rather than leaning on Tailwind: the built bundle has no
 | emerald border or wash in it and the host cannot add one, and a `mt-6` next to this would
 | lose to .ckp-note's margin shorthand anyway.
 */
.ckp-paid {
    background: var(--ckp-ok-wash);
    border: 1px solid #c3e9d3;
    border-radius: 16px;
    color: var(--ckp-ok);
    margin: 24px 0 0;
    padding: 16px 18px;
}

.ckp-paid-lead {
    color: #067647;
    font-size: 14px;
    font-weight: 700;
}

.ckp-paid-note {
    color: #047857;
    font-size: 13px;
    line-height: 1.55;
    margin: 4px 0 0;
}

.ckp-actions {
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 420px) {
    .ckp-actions {
        grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    }
}

.ckp-btn {
    align-items: center;
    border-radius: 16px;
    display: flex;
    font-size: 14.5px;
    font-weight: 800;
    justify-content: center;
    min-height: 52px;
    padding: 12px 18px;
    text-decoration: none;
    transition: transform .12s ease, background-color .18s ease, box-shadow .18s ease;
    width: 100%;
}

.ckp-btn:active {
    transform: scale(.98);
}

.ckp-btn--primary {
    background: var(--ckp-red);
    border: 0;
    box-shadow: 0 14px 28px -18px rgb(230 33 41 / 75%);
    color: #fff;
}

.ckp-btn--primary:hover {
    background: var(--ckp-red-ink);
}

.ckp-btn--primary[disabled] {
    opacity: .6;
}

.ckp-btn--ghost {
    background: #fff;
    border: 1.5px solid var(--ckp-line);
    color: var(--ckp-ink);
}

.ckp-btn--ghost:hover {
    background: #fafafc;
    border-color: #d8d8e0;
}

.ckp-loading {
    align-items: center;
    display: inline-flex;
    gap: 8px;
}

.ckp-loading::before {
    animation: ckp-spin .9s linear infinite;
    border: 2px solid rgb(255 255 255 / 45%);
    border-top-color: #fff;
    border-radius: 50%;
    content: "";
    height: 15px;
    width: 15px;
}

.ckp-fine {
    color: var(--ckp-ink-soft);
    font-size: 12px;
    line-height: 1.55;
    margin: 16px 0 0;
    text-align: center;
}

/* ============================================================================
   3. MOBILE MONEY — the box a number is typed into
   ========================================================================== */

/* The only field on checkout that a customer has to fill rather than tap, and it
   sat under four network tiles in 14px grey inside a 1px border — the same weight
   as everything on this page that merely reports. Now it reads as the destination:
   a wash panel that gathers label and box together, a 2px ink border on the box,
   and the digits at 20px bold with the spacing of a phone number.

   20px is also above the 16px floor Safari uses to decide whether a focused input
   needs zooming, so a phone lands on the number instead of a magnified corner. */

.ckp-momo-entry {
    background: var(--ckp-red-wash);
    border: 1px solid #f6d3d5;
    border-radius: 20px;
    box-sizing: border-box;
    margin-top: 16px;
    padding: 14px 16px 16px;
}

.ckp-momo-label {
    color: var(--ckp-ink);
    display: block;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -.01em;
    margin-bottom: 8px;
}

.ckp-momo-input {
    -webkit-appearance: none;
    appearance: none;
    background: #fff;
    border: 2px solid var(--ckp-ink);
    border-radius: 14px;
    box-sizing: border-box;
    caret-color: var(--ckp-red);
    color: var(--ckp-ink);
    display: block;
    font-family: inherit;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: .06em;
    line-height: 1.3;
    padding: 13px 15px;
    width: 100%;
}

.ckp-momo-input::placeholder {
    color: #9a9aa4;
    font-weight: 600;
    letter-spacing: .06em;
}

.ckp-momo-input:focus {
    border-color: var(--ckp-red);
    box-shadow: 0 0 0 4px rgb(230 33 41 / 16%);
    outline: none;
}

@media (max-width: 480px) {
    .ckp-momo-entry {
        border-radius: 18px;
        margin-top: 14px;
        padding: 12px 12px 14px;
    }

    .ckp-momo-input {
        font-size: 19px;
        padding: 12px 14px;
    }
}
