/*
 * The standalone /payment page (forms/payments/pay-flow.twig).
 * Owner 2026-09-19: "nice and professional, not blah." Two steps, one
 * decision per screen, nothing competing for attention with the amount.
 */

.pp-pay {
    max-width: 560px;
    margin: 0 auto;
    text-align: left;
}

/* ── step rail ─────────────────────────────────────────────────── */
.pp-pay-steps {
    display: flex;
    gap: 0;
    list-style: none;
    margin: 0 0 1.5rem;
    padding: 0;
    counter-reset: none;
}
.pp-pay-steps li {
    flex: 1 1 0;
    min-width: 0;                    /* flex children default to their content width */
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .8125rem;
    font-weight: 500;
    color: #8a9099;
    padding-bottom: .625rem;
    border-bottom: 2px solid #e4e7ea;
    transition: color .2s, border-color .2s;
}
.pp-pay-steps li.is-active {
    color: #23272b;
    border-bottom-color: currentColor;
}
.pp-pay-num {
    flex: 0 0 auto;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: #e4e7ea;
    color: #6c757d;
    font-size: .75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, color .2s;
}
.pp-pay-steps li.is-active .pp-pay-num { background: #23272b; color: #fff; }
.pp-pay-steps li.is-done .pp-pay-num   { background: #2f7d4f; color: #fff; }

/* ── the card ──────────────────────────────────────────────────── */
.pp-pay-card {
    /*
     * The theme ships a global `form { width: 80vw }`. This card IS a form,
     * so without this it sat at 80% of the viewport however wide its parent
     * was — 330px on a 412px phone, with the right-hand gap the owner saw
     * (2026-09-20). A class beats a bare element selector, so this is all it
     * takes; do not touch the global rule, every other form depends on it.
     */
    width: 100%;
    background: #fff;
    border: 1px solid #e4e7ea;
    border-radius: 12px;
    padding: 1.75rem;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .06);
}
.pp-pay-h {
    font-size: 1.125rem;
    font-weight: 600;
    color: #23272b;
    margin: 0 0 1.25rem;
    letter-spacing: -.01em;
}
.pp-pay-field { margin-bottom: 1.25rem; }
.pp-pay-label {
    display: block;
    font-size: .8125rem;
    font-weight: 600;
    color: #4a5058;
    margin-bottom: .375rem;
}

/* ── the amount: a figure first, a box only on purpose ─────────── */
.pp-pay-amountwrap .pp-pay-label { margin-bottom: .5rem; }

.pp-pay-due {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border: 1px solid #e4e7ea;
    border-radius: 8px;
    padding: .75rem 1rem;
    background: #fbfcfd;
}
.pp-pay-duetext { display: flex; flex-direction: column; gap: .125rem; min-width: 0; }
.pp-pay-duelabel { font-size: .75rem; font-weight: 600; color: #6c757d; text-transform: uppercase; letter-spacing: .03em; }
.pp-pay-duefig { font-size: 1.5rem; font-weight: 700; color: #23272b; letter-spacing: -.02em; line-height: 1.1; }

.pp-pay-edit {
    flex: 0 0 auto;
    border: 1px solid #d4d9de;
    background: #fff;
    border-radius: 6px;
    padding: .375rem .75rem;
    font-size: .8125rem;
    font-weight: 600;
    color: #4a5058;
    cursor: pointer;
    transition: border-color .15s, color .15s;
}
.pp-pay-edit:hover { border-color: #23272b; color: #23272b; }

.pp-pay-reset {
    display: inline-block;
    margin-top: .5rem;
    border: 0;
    background: none;
    padding: 0;
    font-size: .8125rem;
    color: #6c757d;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.pp-pay-reset:hover { color: #23272b; }

/* shortcuts: deposit, full price, anything else */
.pp-pay-choices {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: .75rem;
}
.pp-pay-choice {
    border: 1px solid #d4d9de;
    background: #fff;
    border-radius: 999px;
    padding: .375rem .875rem;
    font-size: .8125rem;
    font-weight: 500;
    color: #4a5058;
    cursor: pointer;
    transition: border-color .15s, color .15s, background .15s;
}
.pp-pay-choice:hover { border-color: #23272b; color: #23272b; background: #f7f8f9; }
.pp-pay-choice span { font-weight: 700; }

.pp-pay-memolabel {
    display: block;
    font-size: .8125rem;
    font-weight: 600;
    color: #4a5058;
    margin: 1.125rem 0 .375rem;
}
.pp-pay-memolabel span { font-weight: 400; color: #8a9099; }
.pp-pay-memo { border-radius: 8px; }
.pp-pay-memo:focus { border-color: #23272b; box-shadow: 0 0 0 3px rgba(35, 39, 43, .09); }

#pp-pay-amounterr { display: none; }
#pp-pay-amounterr[style*="block"] { display: block; }

/* the amount reads as the most important thing on the page */
.pp-pay-amount { position: relative; }
.pp-pay-cur {
    position: absolute;
    left: .875rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.25rem;
    font-weight: 600;
    color: #8a9099;
    pointer-events: none;
}
.pp-pay-amount .form-control {
    height: 3.25rem;
    padding-left: 2rem;
    font-size: 1.375rem;
    font-weight: 600;
    border-radius: 8px;
}
.pp-pay-amount .form-control:focus {
    border-color: #23272b;
    box-shadow: 0 0 0 3px rgba(35, 39, 43, .09);
}
.pp-pay-hint {
    font-size: .8125rem;
    color: #6c757d;
    margin: .375rem 0 0;
}
.pp-pay-hint:empty { display: none; }   /* no reserved blank band before a choice */

.pp-pay .select2-container--default .select2-selection--single,
.pp-pay .form-select { border-radius: 8px; }

/* ── buttons ───────────────────────────────────────────────────── */
.pp-pay-next {
    width: 100%;
    height: 3rem;
    border: 0;
    border-radius: 8px;
    background: #23272b;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}
.pp-pay-next:hover  { background: #000; }
.pp-pay-next:active { transform: translateY(1px); }

.pp-pay-back {
    border: 0;
    background: none;
    padding: 0;
    font-size: .8125rem;
    color: #6c757d;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.pp-pay-back:hover { color: #23272b; }

/* ── review ────────────────────────────────────────────────────── */
.pp-pay-summary {
    margin: 0 0 1rem;
    border: 1px solid #e4e7ea;
    border-radius: 8px;
    overflow: hidden;
}
.pp-pay-summary > div {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding: .875rem 1rem;
}
.pp-pay-summary > div + div { border-top: 1px solid #e4e7ea; }
.pp-pay-summary dt {
    font-size: .8125rem;
    font-weight: 500;
    color: #6c757d;
    margin: 0;
}
.pp-pay-summary dd {
    margin: 0;
    font-weight: 600;
    color: #23272b;
    text-align: right;
}
.pp-pay-total { font-size: 1.375rem; letter-spacing: -.02em; }

/* ── pay ───────────────────────────────────────────────────────── */
.pp-pay-go {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e4e7ea;
    text-align: center;
}
.pp-pay-paypal {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    width: 100%;
    height: 3.25rem;
    background: #ffc439;
    border: 0;
    border-radius: 999px;          /* PayPal's own button shape */
    color: #003087;                /* PayPal navy */
    font-size: 1.0625rem;
    font-weight: 700;
    letter-spacing: -.01em;
    cursor: pointer;
    transition: filter .15s, box-shadow .15s;
}
.pp-pay-paypal:hover:not(:disabled) {
    filter: brightness(.96);
    box-shadow: 0 2px 8px rgba(0, 48, 135, .18);
}
.pp-pay-paypal:active:not(:disabled) { transform: translateY(1px); }
.pp-pay-paypal:disabled { opacity: .5; cursor: default; }
.pp-pay-paypal .bi { font-size: 1.25rem; line-height: 1; }

.pp-pay-nocard {
    font-size: .8125rem;
    color: #4a5058;
    margin: .875rem 0 0;
    line-height: 1.5;
}
.pp-pay-nocard .bi { color: #6c757d; }
.pp-pay-nocard strong { color: #23272b; }

.pp-pay-testing {
    margin: 1rem 0 0;
    font-size: .8125rem;
    color: #b02a37;
    text-align: center;
}
.pp-pay-foot {
    margin: 1.25rem 0 0;
    font-size: .8125rem;
    color: #6c757d;
    text-align: center;
}

/* ── phone: edge to edge ───────────────────────────────────────── */
/*
 * Owner 2026-09-20, looking at it on his Android: "make this more mobile
 * friendly and full width instead." The card was floating inside Bootstrap's
 * container gutter, which wastes both margins on the narrowest screens. Pull
 * it back out by exactly that gutter and drop the side border and the corner
 * radius so it reads as the page rather than a card sitting on one.
 */
@media (max-width: 575.98px) {
    .pp-pay { margin-inline: calc(var(--bs-gutter-x, 1.5rem) / -2); }

    .pp-pay-card {
        padding: 1.25rem 1rem;
        border-radius: 0;
        border-left: 0;
        border-right: 0;
        box-shadow: none;
    }
    .pp-pay-steps {
        padding-inline: 1rem;
        margin-bottom: 1rem;
    }
    .pp-pay-steps li { font-size: .75rem; gap: .375rem; }
    .pp-pay-foot { padding-inline: 1rem; }

    /* one shortcut per line beats three chips wrapping 1 + 2 */
    .pp-pay-choices { flex-direction: column; gap: .5rem; }
    .pp-pay-choice { width: 100%; padding: .625rem .875rem; text-align: center; }

    /* thumb-sized controls */
    .pp-pay-edit { min-height: 2.5rem; padding-inline: .875rem; }
    .pp-pay-due { padding: .875rem 1rem; }
    .pp-pay-next, .pp-pay-paypal { height: 3.5rem; }
    .pp-pay-memo { font-size: 1rem; }   /* 16px floor, or iOS zooms the page on focus */
}
