/* =========================================================
   Pay by code: checkout home (/), /ma/{code}, /pa/{number}
   Loaded after checkout.css; uses its --pp-* tokens.
   ========================================================= */

.pb-sr {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0; padding: 0; margin: -1px;
}

.pb-form { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.pb-form > fieldset.pb-after { border: 0; margin: 0; padding: 0; min-width: 0; }
.pb-head { display: flex; flex-direction: column; gap: 6px; }
.pp-phone.is-error .pp-phone__input,
.pp-phone.is-error .pp-phone__cc { border-color: var(--pp-error); }
.pp-hint.is-error:empty { display: none; }

/* ---------------- Home: header band ---------------- */

.pb-home { min-height: 100vh; min-height: 100dvh; background: var(--pp-bg); }

.pb-band { background: var(--pp-navy); color: var(--pp-navy-text); }
.pb-band__inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 20px 24px 120px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.pb-band__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }

.pb-brand { display: inline-flex; align-items: center; gap: 10px; color: #FFFFFF; text-decoration: none; }
.pb-brand:hover { color: #FFFFFF; }
.pb-brand .pp-wordmark { font-family: var(--pp-display); font-size: 19px; color: #FFFFFF; }
.pb-brand__mark {
    width: 32px; height: 32px;
    border-radius: 8px;
    background: var(--pp-accent);
    color: #FFFFFF;
    display: inline-flex; align-items: center; justify-content: center;
    font-family: var(--pp-display);
    font-weight: 700;
    box-shadow: inset 0 -3px 0 #0A1220;
}
.pb-band__link {
    color: var(--pp-navy-link);
    font-size: 14px;
    text-decoration: none;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}
.pb-band__link:hover { color: #FFFFFF; }

.pb-band__title {
    margin: 0;
    font-family: var(--pp-display);
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #FFFFFF;
}
.pb-band__lead { margin: 0; max-width: 560px; font-size: 16px; line-height: 1.5; color: var(--pp-navy-link); }

/* ---------------- Home: card + side ---------------- */

.pb-home__main { max-width: 1080px; margin: -84px auto 0; padding: 0 24px 48px; }
.pb-home__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    align-items: start;
}

.pb-card {
    min-width: 0;
    background: var(--pp-surface);
    border: 1px solid var(--pp-line-soft);
    border-radius: 18px;
    box-shadow: 0 16px 40px rgba(14, 23, 38, .10);
    overflow: hidden;
}

.pb-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-bottom: 1px solid var(--pp-line-soft); }
.pb-tab {
    min-height: 58px;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    background: #F8F9FB;
    color: var(--pp-muted);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
}
.pb-tab:hover { color: var(--pp-ink); }
.pb-tab[aria-selected="true"] { background: var(--pp-surface); color: var(--pp-accent); box-shadow: inset 0 -3px 0 var(--pp-accent); }
.pb-tab:focus-visible { outline-offset: -3px; }

.pb-panel { padding: 28px 28px 8px; }
.pb-panel[hidden] { display: none; }

.pb-code { font-size: 18px; letter-spacing: .06em; }

.pb-lookup:empty { display: none; }

.pb-found {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 2px solid var(--pp-accent);
    background: var(--pp-accent-soft);
    border-radius: 12px;
}
.pb-found--searching { border: 1.5px dashed var(--pp-line); background: #F8F9FB; color: var(--pp-muted); font-size: 14px; }
.pb-found__spin {
    width: 18px; height: 18px; flex: none;
    border: 2.5px solid var(--pp-line);
    border-top-color: var(--pp-accent);
    border-radius: 50%;
    animation: pp-spin .7s linear infinite;
}
.pb-found__mark {
    position: relative;
    width: 44px; height: 44px; flex: none;
    border-radius: 10px;
    background: var(--pp-accent);
    color: #FFFFFF;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--pp-display);
    font-size: 18px;
    font-weight: 700;
    overflow: hidden;
}
.pb-found__logo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #FFFFFF; }
.pb-found__text { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.pb-found__label { font-size: 11px; font-weight: 600; color: var(--pp-muted); text-transform: uppercase; letter-spacing: .05em; }
.pb-found__name { font-size: 16px; overflow-wrap: anywhere; }
.pb-found__detail { font-size: 13px; color: var(--pp-ink-2); }
.pb-round { border-radius: 50% !important; }

.pb-after { display: flex; flex-direction: column; gap: 20px; }
.pb-after[hidden] { display: none; }

.pb-more { border: 1px solid var(--pp-line-soft); border-radius: 12px; background: #FAFBFC; }
.pb-more > summary {
    min-height: 48px;
    padding: 0 14px;
    display: flex; align-items: center;
    font-size: 14px;
    font-weight: 600;
    gap: 4px;
    cursor: pointer;
    list-style: none;
}
.pb-more > summary::-webkit-details-marker { display: none; }
.pb-more > summary::after { content: "+"; margin-left: auto; font-size: 18px; color: var(--pp-muted); }
.pb-more[open] > summary::after { content: "−"; }
.pb-more__body { padding: 4px 14px 16px; display: flex; flex-direction: column; gap: 14px; }

.pb-totals,
.pb-sum { margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.pb-totals[hidden], .pb-sum[hidden] { display: none; }
.pb-totals div, .pb-sum div { display: flex; justify-content: space-between; gap: 12px; }
.pb-totals div[hidden], .pb-sum div[hidden] { display: none; }
.pb-totals dt, .pb-sum dt { color: var(--pp-ink-2); }
.pb-totals dd, .pb-sum dd { margin: 0; font-variant-numeric: tabular-nums; }
.pb-totals { padding: 14px 16px; border: 1px solid var(--pp-line-soft); border-radius: 12px; }
.pb-totals__total { border-top: 1px solid #EEF1F6; padding-top: 10px; font-size: 16px; font-weight: 600; }
.pb-totals__total dt { color: var(--pp-ink); }

.pb-soon { margin: 0; padding: 12px 14px; border-radius: 10px; background: var(--pp-warn-soft); color: #5C3B06; font-size: 14px; }
.pb-soon[hidden] { display: none; }

.pb-warn { margin: 0; padding: 4px 28px 24px; font-size: 13px; line-height: 1.5; color: var(--pp-muted); text-align: center; }

.pb-side { display: flex; flex-direction: column; gap: 16px; padding-top: 4px; }
.pb-side__box {
    background: var(--pp-surface);
    border: 1px solid var(--pp-line-soft);
    border-radius: 14px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--pp-ink-2);
}
.pb-side__box strong { font-size: 15px; color: var(--pp-ink); }
.pb-side__box ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.pb-side .pp-secure { margin-top: 0; justify-content: flex-start; }

/* ---------------- /ma/{code} and /pa/{number} ---------------- */

.pb-scanned { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--pp-navy-muted); }
.pb-label-muted { font-size: 13px; color: var(--pp-navy-muted); }
.pb-verified { margin-top: 3px; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--pp-navy-link); }
.pb-minimark {
    width: 18px; height: 18px;
    border-radius: 5px;
    background: var(--pp-accent);
    color: #FFFFFF;
    display: inline-flex; align-items: center; justify-content: center;
    font-family: var(--pp-display);
    font-size: 11px;
    font-weight: 700;
}

.pb-sum { border-top: 1px solid var(--pp-navy-line); padding-top: 24px; font-size: 15px; }
.pb-sum dt { color: var(--pp-navy-link); }
.pb-sum dd { color: var(--pp-navy-link); }
.pb-sum__total { align-items: baseline; border-top: 1px solid var(--pp-navy-line); padding-top: 14px; }
.pb-sum__total dt { color: var(--pp-navy-text); font-weight: 600; }
.pb-sum__total dd { font-family: var(--pp-display); font-size: 30px; font-weight: 600; color: #FFFFFF; }

.pb-bigamount {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px;
    background: var(--pp-surface);
    border: 2px solid var(--pp-line);
    border-radius: 14px;
    transition: border-color .15s, box-shadow .15s;
}
.pb-bigamount:focus-within { border-color: var(--pp-accent); box-shadow: 0 0 0 4px var(--pp-focus); }
.pb-bigamount.is-error { border-color: var(--pp-error); }
.pb-bigamount span { font-family: var(--pp-display); font-size: 26px; font-weight: 600; color: var(--pp-muted); }
.pb-bigamount input {
    flex: 1;
    min-width: 0;
    height: 56px;
    border: 0;
    outline: none;
    background: transparent;
    font-family: var(--pp-display);
    font-size: 36px;
    font-weight: 600;
    color: var(--pp-ink);
    padding: 0;
}
.pb-bigamount input::placeholder { color: #A3ACBD; }

.pb-chips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pb-chip {
    min-height: 44px;
    padding: 0 6px;
    border: 1.5px solid var(--pp-line);
    border-radius: 999px;
    background: var(--pp-surface);
    color: var(--pp-ink-2);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.pb-chip:hover { border-color: #B4BED0; }
.pb-chip[aria-pressed="true"] { border: 2px solid var(--pp-accent); background: var(--pp-accent-soft); color: var(--pp-accent); }

.pb-details {
    margin: 0;
    padding: 18px 20px 20px;
    border: 1px solid var(--pp-line-soft);
    border-radius: 14px;
    background: var(--pp-surface);
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}
.pb-details legend { padding: 0 6px; margin-left: -6px; font-size: 14px; font-weight: 600; }
.pb-details > .pp-hint { margin: -6px 0 2px; }
.pb-details__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }

.pb-notice,
.pb-warnbox {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 14px;
    line-height: 1.45;
}
.pb-notice svg, .pb-warnbox svg { flex: none; margin-top: 1px; }
.pb-notice { background: #E6EDFD; color: #1E3A8A; }
.pb-notice div { display: flex; flex-direction: column; gap: 2px; }
.pb-warnbox { background: var(--pp-warn-soft); border: 1px solid #F5D9A3; color: #5C3B06; }

/* =========================================================
   Tablet and below
   ========================================================= */
@media (max-width: 959px) {
    .pb-home__grid { grid-template-columns: 1fr; }
    .pb-shell, .ws-shell { align-content: start; }   /* stacked: don't stretch the navy header to fill the screen */
    .pb-side { padding-top: 0; }

    /* On /ma the Continue button shows the total; the navy header stays short. */
    .pb-shell .pb-sum { display: none; }
    .pb-shell .pp-powered { display: block; order: 5; font-size: 13px; color: var(--pp-navy-muted); }
    .pb-shell .pp-powered a { color: #93B4FF; }
}

/* =========================================================
   Phones
   ========================================================= */
@media (max-width: 639px) {
    .pb-band__inner { padding: 12px 16px 96px; gap: 10px; }
    .pb-band__top { margin-bottom: 16px; }
    .pb-band__lead { font-size: 15px; }

    .pb-home__main { margin-top: -68px; padding: 0 16px 32px; }
    .pb-card { border-radius: 16px; }
    .pb-tab { min-height: 54px; font-size: 14px; }
    .pb-tab svg { display: none; }
    .pb-panel { padding: 20px 16px 4px; }
    .pb-warn { padding: 4px 16px 20px; }

    /* The home card's Continue stays in the card (no sticky bar): it sits right under the amount. */

    .pb-bigamount { padding: 6px 14px; }
    .pb-bigamount span { font-size: 22px; }
    .pb-bigamount input { height: 50px; font-size: 30px; }
    .pb-chip { font-size: 13px; }

    .pb-details { padding: 16px; }
    .pb-details__grid { grid-template-columns: 1fr; }
}

@media (max-width: 359px) {
    .pb-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------------- /p/{id}: wallet checkout ---------------- */

.ws-note {
    margin-top: 6px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #16213A;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--pp-navy-link);
    overflow-wrap: anywhere;
}
.ws-note__k { color: var(--pp-navy-muted); }
.pp-provider__tag.ws-free { background: var(--pp-success-soft); color: #0B5C34; }
