/* ==========================================================================
   Checkout — the instalment payment pages and their outcomes.

   These run outside the panel on their own layout, so this file is the whole
   stylesheet for them. Scoped under .co.
   ========================================================================== */

.co {
    --ink: #2d2d2d;
    --muted: #6b7280;
    /* Line labels, dates and notes are all small text people read before
       paying, so the faint tone clears 4.5:1 on white and on --bg. */
    --faint: #616e85;
    --bg: #f5f7fa;
    --surface: #ffffff;
    --line: #e5e9f2;
    --line-soft: #eef1f6;
    --brand: #fbd202;
    --brand-tint: #fffdf2;
    --ok: #15803d;
    --ok-bg: #f0fdf4;
    --warn: #92400e;
    --warn-bg: #fffbeb;
    --danger: #9f1239;
    --danger-bg: #fff1f2;

    --r: 1.25rem;
    --r-sm: 0.75rem;

    min-height: 100dvh;
    padding: 1.5rem 1rem calc(2rem + env(safe-area-inset-bottom));
    background: var(--bg);
    font-family: Dana, system-ui, sans-serif;
    color: var(--ink);
    line-height: 1.7;
}

.co *,
.co *::before,
.co *::after {
    box-sizing: border-box;
}

/* One narrow column. A checkout reads top to bottom like a landing page —
   what you are buying, what it costs, how you pay — and two columns only made
   a phone stack them anyway, in an order nobody chose. */
.co-shell {
    max-width: 34rem;
    margin-inline: auto;
}

/* ------------------------------------------------------------------ Brand */

.co-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.co-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
}

.co-brand img {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: var(--ink);
    padding: 5px;
    object-fit: contain;
}

.co-brand small {
    display: block;
    color: var(--faint);
    font-size: 0.72rem;
    font-weight: 400;
}

/* A padlock is the one piece of reassurance worth saying out loud on a page
   that is about to ask for money. */
.co-secure {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    background: var(--ok-bg);
    color: var(--ok);
    font-size: 0.74rem;
    font-weight: 700;
}

/* ----------------------------------------------------------------- Layout */

/* One sheet, with the cover at the top of it */
.co-sheet {
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: var(--surface);
    overflow: hidden;
}

/*
 * One shape, always 16:9 — the shape the banners are drawn at.
 *
 * It used to be capped at a share of the viewport and flattened to 21:9 on a
 * short screen, which bought back some of the fold but meant the box changed
 * proportion as the window moved: `cover` then re-cropped, and the picture
 * appeared to slide about under it. A banner that shifts while you are reading
 * the price is worse than one that costs a little height.
 */
.co-hero {
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--bg);
}

.co-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.co-hero-badge {
    position: absolute;
    inset-block-start: 0.85rem;
    inset-inline-start: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    background: var(--brand);
    color: var(--ink);
    font-size: 0.72rem;
    font-weight: 700;
    box-shadow: 0 8px 18px -10px rgba(0, 0, 0, 0.6);
}

.co-body {
    padding: 1.15rem;
}

@media (min-width: 600px) {
    .co-body {
        padding: 1.5rem;
    }
}

.co-section {
    padding-top: 1rem;
    margin-top: 1rem;
    border-top: 1px solid var(--line-soft);
}

.co-card-title {
    margin: 0 0 1.1rem;
    font-size: 0.95rem;
    font-weight: 700;
}

/* ------------------------------------------------------------ Order summary */

/* Centred, like the figures under it: one axis through the head of the page
   rather than a name anchored to one edge and a price floating free of it. */
.co-title {
    margin: 0 0 0.85rem;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.7;
    text-align: center;
}

.co-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    background: var(--brand-tint);
    border: 1px solid #f4e6a8;
    color: #7a6100;
    font-size: 0.7rem;
    font-weight: 700;
}

/*
 * The price, and the only place the full-payment page states it.
 *
 * Stacked and centred rather than set in a row: the old figure is what makes
 * the new one read as cheap, so it sits directly above it, close enough that
 * the eye takes both in one movement. The struck line is drawn as you arrive
 * so the drop is something the page does, not something it reports.
 *
 * It sits on a card because centred text with nothing behind it reads as a
 * gap in the page rather than as its own thing — but a pale one with a green
 * edge, not a filled panel: the figures should be what carries the colour.
 */
.co-price {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 0.2rem;
    margin: 0 0 1.1rem;
    padding: 1.15rem 1rem 1rem;
    border: 1px solid #e4eee8;
    border-radius: var(--r);
    background:
        radial-gradient(120% 150% at 50% 0%, rgba(46, 158, 79, 0.09), transparent 62%),
        var(--surface);
    text-align: center;
    overflow: hidden;
}

.co-price::before {
    content: "";
    position: absolute;
    inset-block-start: 0;
    inset-inline: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--ok), #4ec26f, var(--ok));
}

/* The shop's red, one step down: #e53935 is 4.2:1 on white and this line is
   not large enough for that to pass. #d32f2f is the same red and clears 5:1. */
.co-price-was {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 0;
    color: #d32f2f;
    font-size: 1rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.co-price-was small {
    margin-inline-start: 0.25rem;
    font-size: 0.72rem;
    font-weight: 500;
}

.co-price-was s {
    position: relative;
    text-decoration: none;
}

/*
 * Tilted, and pivoted about its own middle.
 *
 * Turning it about one end swung the whole rule off the number — the far end
 * dropped a full sixteen pixels and the line ran under the digits instead of
 * across them, which is what made it look broken rather than deliberate. About
 * the centre the tilt is shared, so the rule enters the figures low and leaves
 * them high, crossing each digit at a point rather than tracing its waist.
 *
 * It is also drawn at partial strength: a solid rule over a number is a rule
 * you read instead of the number.
 *
 * The reveal is a clip rather than a growing width, because a box that changes
 * width while it is rotated pivots about a moving centre and wobbles. At rest
 * — where reduced motion drops the animation — the clip is absent and the full
 * line shows.
 */
.co-price-was s::after {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 52%;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    opacity: 0.6;
    transform: rotate(-6deg);
    animation: co-strike 8s 0.4s cubic-bezier(0.65, 0, 0.35, 1) infinite backwards;
}

/* Drawn, held, faded out, drawn again — every eight seconds. A line that is
   simply there is scenery; one that arrives is the moment the price drops,
   and anyone who looked away has it played back to them. */

@keyframes co-strike {
    0% {
        clip-path: inset(0 0 0 100%);
        opacity: 0.6;
    }

    8%,
    88% {
        clip-path: inset(0 0 0 0);
        opacity: 0.6;
    }

    96%,
    100% {
        clip-path: inset(0 0 0 0);
        opacity: 0;
    }
}

/* How much came off, as a share rather than a sum. A percentage is the one
   number a reader can judge without doing any arithmetic of their own. */
.co-price-off {
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    background: var(--danger-bg);
    color: #b3261e;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}

/* The shop's green. At 32px in 800 this is large text, where 3:1 is the bar,
   so it keeps the brightness of the original. */
.co-price-now {
    margin: 0;
    color: #2e9e4f;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.4;
    font-variant-numeric: tabular-nums;
    animation: co-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes co-pulse {
    50% {
        opacity: 0.55;
    }
}

/* A darker green for the unit: at this size the bright one is 3.4:1, and only
   the figure beside it is large enough to live on that. */
.co-price-now small {
    margin-inline-start: 0.35rem;
    color: var(--ok);
    font-size: 0.8rem;
    font-weight: 600;
}

/*
 * An itemised receipt, not a headline number.
 *
 * The old page put the late fee inside the amount due and then listed it again
 * on its own, so the two never added up to anything you could follow. Every
 * line here is a step from the course price to what is owed today.
 */
.co-lines {
    display: grid;
    gap: 0.75rem;
    margin: 0;
}

.co-line {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.85rem;
}

.co-line dt {
    color: var(--muted);
    min-width: 0;
}

.co-line dd {
    margin: 0;
    /* Fixed-width figures so the column of numbers lines up */
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    font-weight: 700;
    /* These are the steps towards the total, not the number anyone acts on —
       at full strength they competed with it. */
    color: var(--muted);
}

/*
 * An amount is one left-to-right unit, sign included. Left to the bidi
 * algorithm inside an RTL row, "−8,010,000" is reordered to "8,010,000−": the
 * sign is a neutral, so it takes the direction of the line and lands on the
 * far side of the digits, reading as a stray mark rather than a subtraction.
 *
 * The isolate is what lets the row stay RTL around it, so "تومان" still falls
 * after the number the way it is spoken.
 */
.co-amount {
    direction: ltr;
    unicode-bidi: isolate;
}

.co-line dd small {
    margin-inline-start: 0.3rem;
    font-size: 0.78em;
    font-weight: 400;
}

.co-line.is-paid dd {
    color: var(--ok);
}

.co-line.is-penalty dt,
.co-line.is-penalty dd {
    color: var(--danger);
}

/*
 * The price before a campaign. Struck through in red beside how much came off,
 * so the two read as one statement — this was the price, this much you are not
 * paying. It carries more weight than the muted rows around it because it is
 * the number the offer is measured against.
 *
 * The strike sits on the <s>, not the row: a decoration set on the parent is
 * drawn across every inline child, and it would run through the badge too.
 */
.co-line.is-was dd {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    color: var(--danger);
    font-size: 1.05rem;
}

.co-line.is-was dd s {
    text-decoration-color: rgba(159, 18, 57, 0.65);
}

.co-off {
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    background: var(--danger-bg);
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}

.co-line.is-forgiven dd {
    color: var(--ok);
    text-decoration: line-through;
    text-decoration-color: rgba(21, 128, 61, 0.5);
}

/*
 * The one figure the page is actually asking for. As another label-left,
 * number-right row it read as one more line item; centred on a yellow field it
 * is the only thing in the receipt that looks different, which is the point.
 */
.co-total {
    display: grid;
    justify-items: center;
    gap: 0.1rem;
    margin-top: 1.1rem;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(251, 210, 2, 0.6);
    border-radius: var(--r-sm);
    background: #fff6cc;
    text-align: center;
}

.co-total span {
    font-size: 0.85rem;
    font-weight: 700;
    color: #6b5800;
}

.co-total strong {
    font-size: 1.45rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.co-total small {
    font-size: 0.8rem;
    font-weight: 400;
    color: #6b5800;
    margin-inline-start: 0.25rem;
}

/* ----------------------------------------------------------------- Facts */

/*
 * Read-only details as plain rows. They used to be disabled text inputs, which
 * look like fields you may type in, are announced as disabled controls, and
 * grey out the very facts you are meant to check before paying.
 */
.co-facts {
    display: grid;
    gap: 0.6rem;
    margin: 1.1rem 0 0;
    padding-top: 1.1rem;
    border-top: 1px solid var(--line-soft);
}

.co-fact {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.82rem;
}

.co-fact dt {
    color: var(--faint);
}

.co-fact dd {
    margin: 0;
    font-weight: 700;
    text-align: end;
}

.co-fact dd[dir="ltr"] {
    font-variant-numeric: tabular-nums;
}

/* ----------------------------------------------------------------- Fields */

.co-field {
    margin-bottom: 1rem;
}

.co-field label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.8rem;
    font-weight: 700;
}

.co-input {
    width: 100%;
    min-height: 50px;
    padding: 0.6rem 1rem;
    border: 1.5px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--surface);
    color: var(--ink);
    font-family: inherit;
    /* 16px so focusing it does not zoom the page on iOS */
    font-size: 1rem;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.co-input::placeholder {
    color: var(--faint);
}

.co-input:focus {
    outline: 0;
    border-color: var(--ink);
    box-shadow: 0 0 0 4px rgba(45, 45, 45, 0.06);
}

.co-error {
    display: block;
    margin-top: 0.35rem;
    color: var(--danger);
    font-size: 0.76rem;
}

/* --------------------------------------------------------- Payment methods */

.co-methods {
    display: grid;
    gap: 0.5rem;
    margin-bottom: 0.9rem;
}

.co-method {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.9rem;
    border: 1.5px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--surface);
    cursor: pointer;
    transition:
        border-color 0.2s ease,
        background 0.2s ease;
}

.co-method:hover {
    border-color: #d6dce8;
}

.co-method:has(input:checked) {
    border-color: var(--ink);
    background: var(--brand-tint);
}

.co-method input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* The dot is drawn rather than native so it survives the brand's colours */
.co-radio {
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #c4cbd8;
    flex-shrink: 0;
    transition:
        border-color 0.2s ease,
        background 0.2s ease;
}

.co-radio::after {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--ink);
    transform: scale(0);
    transition: transform 0.15s ease;
}

.co-method:has(input:checked) .co-radio {
    border-color: var(--ink);
}

.co-method:has(input:checked) .co-radio::after {
    transform: scale(1);
}

.co-method input:focus-visible ~ .co-radio {
    outline: 2px solid var(--ink);
    outline-offset: 2px;
}

.co-method-text {
    flex: 1;
    min-width: 0;
    font-size: 0.88rem;
    font-weight: 700;
}

.co-method-text small {
    display: block;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 400;
}

.co-badge {
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    background: var(--brand);
    color: var(--ink);
    font-size: 0.68rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* Card-to-card panel ------------------------------------------------------ */

.co-card-transfer {
    padding: 1.1rem;
    margin-bottom: 1.1rem;
    border-radius: var(--r-sm);
    background: var(--bg);
    text-align: center;
}

.co-card-transfer img {
    display: block;
    width: min(100%, 19rem);
    margin-inline: auto;
    cursor: pointer;
    border-radius: 0.6rem;
}

.co-card-number {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 0.85rem auto 0;
    padding: 0.55rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--surface);
    color: var(--ink);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.06em;
    direction: ltr;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.co-card-number:hover {
    border-color: var(--ink);
}

.co-card-number svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--muted);
}

.co-card-number.is-copied {
    border-color: var(--ok);
    color: var(--ok);
}

.co-card-number.is-copied svg {
    color: var(--ok);
}

.co-card-hint {
    margin: 0.75rem 0 0;
    color: var(--muted);
    font-size: 0.78rem;
}

.co-card-hint a {
    color: #2e5bfe;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ----------------------------------------------------------------- Coupon */

.co-coupon {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.9rem;
    font-size: 0.85rem;
    cursor: pointer;
}

.co-coupon input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.co-check {
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 2px solid #c4cbd8;
    color: transparent;
    flex-shrink: 0;
    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        color 0.2s ease;
}

.co-coupon input:checked ~ .co-check {
    border-color: var(--ink);
    background: var(--ink);
    color: var(--brand);
}

.co-coupon input:focus-visible ~ .co-check {
    outline: 2px solid var(--ink);
    outline-offset: 2px;
}

.co-check svg {
    width: 12px;
    height: 12px;
}

/* --------------------------------------------------------------- Buttons */

.co-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    width: 100%;
    min-height: 54px;
    padding: 0.7rem 1.25rem;
    border: 1.5px solid transparent;
    border-radius: var(--r-sm);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.co-btn:active {
    transform: scale(0.99);
}

.co-btn.is-brand {
    background: var(--brand);
    color: var(--ink);
}

.co-btn.is-brand:hover {
    background: #ffdc3a;
    color: var(--ink);
}

.co-btn.is-dark {
    background: var(--ink);
    color: #fff;
}

.co-btn.is-dark:hover {
    background: #1f1f1f;
    color: #fff;
}

.co-btn.is-ghost {
    background: var(--surface);
    border-color: var(--line);
    color: var(--ink);
}

.co-btn.is-ghost:hover {
    border-color: #d6dce8;
}

.co-btn.is-auto {
    width: auto;
}

.co-btn[disabled] {
    opacity: 0.55;
    pointer-events: none;
}

.co-pay-note {
    margin: 0.75rem 0 0;
    text-align: center;
    color: var(--faint);
    font-size: 0.76rem;
}

/* ------------------------------------------------------------------- Dock */

/*
 * What you owe and the button that pays it, held at the foot of the page.
 *
 * The sticky element is this wrapper rather than anything inside it: a sticky
 * box can only travel within its containing block, so it has to be a child of
 * the tall column, not of a box its own height.
 */
.co-dock {
    position: sticky;
    bottom: 0;
    z-index: 10;
    margin-top: 1rem;
    padding: 0.85rem;
    padding-bottom: max(0.85rem, env(safe-area-inset-bottom));
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 -14px 30px -24px rgba(15, 18, 24, 0.7);
}

/*
 * Side by side wherever the two will fit, phone included. The breakpoint this
 * replaced was 480px, which is wider than most phones — so the layout people
 * actually check out on was the one that stacked, and a dock meant to hold
 * three things in reach became a column half the screen tall.
 *
 * auto-fit against a 9rem floor asks the question the right way round: two
 * columns whenever there is room for two, one when there is not.
 */
.co-dock-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
    gap: 0.5rem 0.6rem;
    margin-bottom: 0.7rem;
}

.co-dock-fields .co-field {
    margin-bottom: 0;
}

.co-dock-fields .co-input {
    min-height: 46px;
}

.co-dock-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.co-dock-total {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex-shrink: 0;
}

.co-dock-total small {
    color: var(--faint);
    font-size: 0.7rem;
}

.co-dock-total strong {
    font-size: 1.1rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.co-dock .co-btn {
    flex: 1;
    min-width: 0;
}

.co-dock .co-pay-note {
    margin-top: 0.6rem;
}

/* ---------------------------------------------------------------- Notices */

.co-note {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.7rem 0.9rem;
    margin-bottom: 0.9rem;
    border-radius: var(--r-sm);
    font-size: 0.8rem;
    line-height: 1.9;
}

.co-note svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 3px;
}

.co-note.is-info {
    background: var(--bg);
    color: #3f4653;
}

.co-note.is-warning {
    background: var(--warn-bg);
    border: 1px solid #fde68a;
    color: var(--warn);
}

.co-note.is-danger {
    background: var(--danger-bg);
    border: 1px solid #fecdd3;
    color: var(--danger);
}

.co-note.is-success {
    background: var(--ok-bg);
    border: 1px solid #bbf7d0;
    color: var(--ok);
}

/* Tailwind's .hidden is one class and .co-note.is-success is two, so the note
   out-specified it and the empty success box sat there as a green bar. */
.co-note[hidden],
.co-note.hidden {
    display: none;
}

/* ---------------------------------------------------------------- Dialogs */

.co-dialog {
    position: fixed;
    inset: 0;
    z-index: 50;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.co-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 18, 24, 0.55);
    backdrop-filter: blur(4px);
}

.co-panel {
    position: relative;
    width: 100%;
    max-width: 30rem;
    max-height: 90dvh;
    overflow-y: auto;
    border-radius: var(--r);
    background: var(--surface);
    box-shadow: 0 40px 80px -40px rgba(15, 18, 24, 0.6);
    transition:
        transform 0.2s ease,
        opacity 0.2s ease;
}

.co-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.35rem;
    border-bottom: 1px solid var(--line-soft);
}

.co-panel-head h2,
.co-panel-head h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
}

.co-panel-close {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: var(--bg);
    color: var(--muted);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
}

.co-panel-close:hover {
    background: var(--line);
    color: var(--ink);
}

.co-panel-body {
    padding: 1.35rem;
}

.co-panel-foot {
    display: flex;
    gap: 0.6rem;
    padding: 0 1.35rem 1.35rem;
}

/* Receipt upload --------------------------------------------------------- */

.co-drop {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 1.5rem 1rem;
    border: 2px dashed #d6dce8;
    border-radius: var(--r-sm);
    background: var(--bg);
    color: var(--muted);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition:
        border-color 0.2s ease,
        color 0.2s ease;
}

.co-drop:hover {
    border-color: var(--ink);
    color: var(--ink);
}

.co-file {
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding: 0.6rem 0.8rem;
    border-radius: var(--r-sm);
    background: var(--ok-bg);
    color: var(--ok);
    font-size: 0.8rem;
}

.co-file svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ==========================================================================
   Outcome pages
   ========================================================================== */

.co-outcome {
    max-width: 34rem;
    margin-inline: auto;
    padding: 2.5rem 1.5rem;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: var(--surface);
    text-align: center;
}

.co-outcome-icon {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    margin: 0 auto 1.25rem;
    border-radius: 50%;
    font-size: 2rem;
}

.co-outcome-icon.is-success {
    background: var(--ok-bg);
    color: var(--ok);
}

.co-outcome-icon.is-danger {
    background: var(--danger-bg);
    color: var(--danger);
}

.co-outcome-icon.is-warning {
    background: var(--warn-bg);
    color: var(--warn);
}

.co-outcome-icon svg {
    width: 36px;
    height: 36px;
}

.co-outcome h1 {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.7;
}

.co-outcome p {
    margin: 0 auto 1.5rem;
    max-width: 44ch;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 2;
}

.co-receipt {
    display: grid;
    gap: 0.6rem;
    margin: 0 0 1.5rem;
    padding: 1.1rem;
    border-radius: var(--r-sm);
    background: var(--bg);
    text-align: start;
}

/* Side by side wherever the two will fit, the same question the dock asks,
   so a phone gets the layout a desktop gets rather than a stacked variant of
   it. */
.co-outcome-actions {
    display: grid;
    gap: 0.6rem;
}

.co-outcome-actions.is-split {
    grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
}

/*
 * Short screens.
 *
 * The point of this page is that the choice between paying online and paying
 * by card is a choice you can see, not one you have to scroll to find. Where
 * there is little height to spend, every gap closes by a notch — the banner
 * itself is left alone, because a picture that changes shape with the window
 * is the more expensive problem.
 */
@media (max-height: 880px) {
    .co {
        padding-top: 1rem;
    }

    .co-price {
        padding: 0.85rem 1rem;
        margin-bottom: 0.9rem;
    }

    .co-price-now {
        font-size: 1.75rem;
    }

    .co-title {
        margin-bottom: 0.7rem;
    }

    .co-card-title {
        margin-bottom: 0.75rem;
    }

    .co-note {
        margin-bottom: 0.75rem;
    }

    .co-section {
        padding-top: 0.85rem;
        margin-top: 0.85rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .co * {
        transition-duration: 0.01ms !important;
        animation: none !important;
    }
}
