/* Web Payments V2 — inner checkout panel.
   Every selector is scoped to .sp-pay so the existing site CSS is untouched. */

.sp-pay {
    --sp-ink: #15171a;
    --sp-ink-2: #3b3a37;
    --sp-muted: #77736c;
    --sp-line: #e2e1de;
    --sp-line-2: #ecebe8;
    --sp-surface: #ffffff;
    --sp-brand: #e53e29;
    --sp-brand-dark: #c93221;
    --sp-error: #b3261e;
    --sp-error-bg: #fdf2f0;
    --sp-success: #1e7a4c;
    --sp-mtn: #f2c200;
    --sp-airtel: #e40000;
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
    color: var(--sp-ink);
    font-family: "Archivo", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.45;
    font-feature-settings: "tnum" 1;
}

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

.sp-pay__panel {
    background: var(--sp-surface);
    border: 1px solid var(--sp-line);
    border-radius: 8px;
    padding: 26px 30px 30px;
}

.sp-pay__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 20px;
    margin-bottom: 14px;
}

.sp-pay__step-label {
    font-size: 11px;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    color: var(--sp-muted);
    font-weight: 600;
}

.sp-pay__back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 0;
    background: none;
    color: var(--sp-muted);
    padding: 0;
    font: inherit;
    font-size: 12.5px;
    cursor: pointer;
}

.sp-pay__back svg {
    width: 14px;
    height: 14px;
}

.sp-pay__back:hover {
    color: var(--sp-ink);
}

.sp-pay__error {
    margin: 0 0 14px;
    padding: 8px 10px;
    border: 1px solid #f0c9c3;
    border-radius: 5px;
    background: var(--sp-error-bg);
    color: var(--sp-error);
    font-size: 13.5px;
}

.sp-pay__sr {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.sp-pay__step[hidden] {
    display: none;
}

.sp-pay__step.is-active {
    animation: spPayIn 220ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.sp-pay__title {
    margin: 0 0 6px;
    font-family: inherit !important;
    font-size: 26px;
    line-height: 1.2;
    font-weight: 650;
    letter-spacing: -0.015em;
    text-transform: none;
    color: var(--sp-ink);
}

.sp-pay__sent {
    margin: 0 0 20px;
    color: var(--sp-muted);
    font-size: 14.5px;
}

.sp-pay__label {
    display: block;
    margin: 0 0 8px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: normal;
    text-transform: none;
    color: var(--sp-ink);
}

.sp-pay__input,
.sp-pay__phone {
    width: 100%;
    height: 52px;
    border: 1px solid #cfcecb;
    border-radius: 5px;
    background: var(--sp-surface);
    font: inherit;
    font-size: 17px;
    color: var(--sp-ink);
    outline: 0;
}

.sp-pay__input {
    padding: 0 14px;
    font-weight: 400;
}

.sp-pay__input:focus,
.sp-pay__phone:focus-within,
.sp-pay__amount:focus-within,
.sp-pay__code:focus {
    border-color: var(--sp-ink);
    box-shadow: 0 0 0 3px rgba(21, 23, 26, 0.07);
}

.sp-pay__phone {
    display: flex;
    align-items: center;
    overflow: hidden;
}

.sp-pay__phone .sp-pay__prefix {
    padding: 0 13px;
    border-right: 1px solid var(--sp-line-2);
    color: var(--sp-muted);
    font-size: 15px;
}

.sp-pay__phone input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: 0;
    background: transparent;
    padding: 0 14px;
    font: inherit;
    font-size: 18px;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: var(--sp-ink);
    outline: 0;
}

.sp-pay__student {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.sp-pay__name {
    font-size: 24px;
    line-height: 1.25;
    font-weight: 650;
    letter-spacing: -0.01em;
    color: var(--sp-ink);
}

.sp-pay__meta-text {
    margin-top: 3px;
    color: var(--sp-muted);
    font-size: 14px;
}

.sp-pay__rule {
    height: 1px;
    margin: 20px 0;
    background: var(--sp-line-2);
}

.sp-pay__tabs {
    display: flex;
    gap: 28px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--sp-line-2);
}

.sp-pay__tab {
    margin: 0 0 -1px;
    padding: 0 0 8px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: none;
    color: var(--sp-muted);
    font: inherit;
    font-size: 15px;
    font-weight: 400;
    letter-spacing: normal;
    text-transform: none;
    cursor: pointer;
}

.sp-pay__tab.is-active {
    color: var(--sp-ink);
    border-bottom-color: var(--sp-ink);
    font-weight: 600;
}

.sp-pay__amount {
    display: flex;
    align-items: center;
    height: 60px;
    border: 1px solid #cfcecb;
    border-radius: 5px;
    background: var(--sp-surface);
    overflow: hidden;
}

.sp-pay__amount .sp-pay__currency {
    padding-left: 14px;
    color: var(--sp-muted);
    font-size: 13px;
    font-weight: 600;
}

.sp-pay__amount input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: 0;
    background: transparent;
    padding: 0 14px;
    font: inherit;
    font-size: 30px;
    font-weight: 650;
    letter-spacing: -0.01em;
    color: var(--sp-ink);
    outline: 0;
}

.sp-pay__amount-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
}

.sp-pay__amount-meta span {
    color: var(--sp-muted);
    font-size: 12.5px;
}

.sp-pay__link {
    border: 0;
    background: none;
    color: var(--sp-ink-2);
    padding: 0;
    font: inherit;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: normal;
    text-transform: none;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
    white-space: nowrap;
}

.sp-pay__link:hover {
    color: var(--sp-ink);
}

.sp-pay__link[disabled] {
    opacity: 0.5;
    cursor: default;
    text-decoration: none;
}

.sp-pay__hint {
    margin: 8px 0 0;
    color: var(--sp-muted);
    font-size: 12.5px;
}

.sp-pay__hint.sp-pay__hint--error {
    color: var(--sp-error);
}

.sp-pay__search {
    position: relative;
    margin-bottom: 10px;
}

.sp-pay__search svg {
    position: absolute;
    left: 15px;
    top: 50%;
    width: 18px;
    height: 18px;
    margin-top: -9px;
    color: var(--sp-muted);
    pointer-events: none;
}

.sp-pay__input--search {
    padding-left: 44px;
}

.sp-pay__fee-count {
    margin: 0 0 8px;
    color: var(--sp-muted);
    font-size: 12px;
}

.sp-pay__fee-list {
    display: flex;
    flex-direction: column;
    max-height: 296px;
    overflow-y: auto;
    border: 1px solid var(--sp-line);
    border-radius: 6px;
    margin-bottom: 4px;
    scrollbar-width: thin;
}

.sp-pay__fee {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    border-bottom: 1px solid var(--sp-line-2);
    font-family: inherit;
    font-weight: 400;
    letter-spacing: normal;
    text-transform: none;
    cursor: pointer;
}

.sp-pay__fee[hidden] {
    display: none;
}

.sp-pay__fee:last-child {
    border-bottom: 0;
}

.sp-pay__fee.is-selected {
    background: #faf7f4;
}

.sp-pay__fee:hover {
    background: #fbfaf8;
}

.sp-pay__fee input {
    margin: 0;
    accent-color: var(--sp-ink);
    flex: none;
}

.sp-pay__fee-text {
    flex: 1;
    min-width: 0;
}

.sp-pay__fee-name {
    display: block;
    font-size: 15px;
    font-weight: 550;
    color: var(--sp-ink);
}

.sp-pay__fee-category {
    display: block;
    margin-top: 2px;
    color: var(--sp-muted);
    font-size: 12.5px;
}

.sp-pay__fee-amount {
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
}

.sp-pay__empty {
    margin: 0 0 4px;
    color: var(--sp-muted);
    font-size: 13.5px;
}

.sp-pay__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 52px;
    margin-top: 22px;
    border: 1px solid var(--sp-brand-dark);
    border-radius: 5px;
    background: var(--sp-brand);
    color: #ffffff;
    font: inherit;
    font-size: 15px;
    font-weight: 650;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background 150ms ease, transform 150ms ease;
}

.sp-pay a.sp-pay__btn {
    color: #ffffff !important;
    text-decoration: none !important;
}

.sp-pay__btn:hover {
    background: var(--sp-brand-dark);
}

.sp-pay__btn:active {
    transform: translateY(1px);
}

.sp-pay__btn:focus-visible,
.sp-pay__link:focus-visible,
.sp-pay__tab:focus-visible,
.sp-pay__back:focus-visible {
    outline: 2px solid var(--sp-ink);
    outline-offset: 2px;
}

.sp-pay__btn[disabled] {
    opacity: 0.55;
    cursor: default;
}

.sp-pay__btn.is-busy {
    color: transparent;
    position: relative;
    pointer-events: none;
}

.sp-pay__btn.is-busy::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 17px;
    height: 17px;
    margin: -9px 0 0 -9px;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spPaySpin 700ms linear infinite;
}

.sp-pay__btn--quiet {
    margin-top: 14px;
    border-color: var(--sp-line);
    background: var(--sp-surface);
    color: var(--sp-ink);
}

.sp-pay__btn--quiet:hover {
    background: #f7f6f3;
}

.sp-pay__recap {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.sp-pay__recap-amount {
    font-size: 22px;
    font-weight: 650;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.sp-pay__network {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    color: var(--sp-muted);
    font-size: 12.5px;
    opacity: 0;
    transform: translateY(-2px);
    transition: opacity 160ms ease, transform 160ms ease;
}

.sp-pay__network.is-visible {
    opacity: 1;
    transform: none;
}

.sp-pay__network i {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--sp-mtn);
}

.sp-pay__network.is-airtel i {
    background: var(--sp-airtel);
}

.sp-pay__code {
    width: 100%;
    height: 60px;
    border: 1px solid #cfcecb;
    border-radius: 5px;
    background: var(--sp-surface);
    padding: 0 0 0 0.34em;
    color: var(--sp-ink);
    font: inherit;
    font-size: 28px;
    font-weight: 400;
    letter-spacing: 0.34em;
    text-align: center;
    outline: 0;
}

.sp-pay__code::placeholder {
    color: #c3c0ba;
    letter-spacing: 0.34em;
}

.sp-pay__links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-top: 15px;
}

.sp-pay__status-dot {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: #f7f6f3;
    display: grid;
    place-items: center;
    position: relative;
}

.sp-pay__status-dot::after {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--sp-brand);
    animation: spPayPulse 1.8s ease-in-out infinite;
}

.sp-pay__check {
    width: 58px;
    height: 58px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: #e8f3ed;
    color: var(--sp-success);
    display: grid;
    place-items: center;
    font-size: 30px;
    font-weight: 700;
    animation: spPayCheck 260ms ease-out both;
}

.sp-pay__step[data-step="status"] [data-status] h1,
.sp-pay__step[data-step="status"] [data-status] .sp-pay__sent,
.sp-pay__step[data-step="status"] [data-status] .sp-pay__hint,
.sp-pay__step[data-step="status"] [data-status] .sp-pay__btn {
    text-align: center;
}

.sp-pay__step[data-step="status"] [data-status] .sp-pay__link {
    display: block;
    margin: 14px auto 0;
}

@keyframes spPayIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes spPaySpin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes spPayPulse {
    0%, 100% {
        opacity: 0.35;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1.15);
    }
}

@keyframes spPayCheck {
    from {
        opacity: 0;
        transform: scale(0.7);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width: 767px) {
    /* Only /pay loads this asset. The existing layout uses an inline 80px padding. */
    .services-section-two {
        padding: 18px 12px 36px !important;
    }

    .sp-pay {
        font-size: 15px;
    }

    .sp-pay__panel {
        padding: 20px 18px 22px;
        border-radius: 6px;
    }

    .sp-pay__title {
        font-size: 23px;
    }

    .sp-pay__sent {
        font-size: 13.5px;
    }

    .sp-pay__label {
        font-size: 12.5px;
    }

    .sp-pay__name {
        font-size: 21px;
    }

    .sp-pay__meta-text {
        font-size: 13px;
    }

    .sp-pay__input,
    .sp-pay__phone {
        font-size: 16px;
    }

    .sp-pay__phone input {
        font-size: 17px;
    }

    .sp-pay__amount input {
        font-size: 26px;
    }

    .sp-pay__fee-list {
        max-height: 260px;
    }

    .sp-pay__btn {
        margin-top: 18px;
        font-size: 14.5px;
    }

    .sp-pay__code {
        font-size: 26px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sp-pay__step.is-active,
    .sp-pay__check,
    .sp-pay__btn.is-busy::after,
    .sp-pay__status-dot::after {
        animation: none;
    }

    .sp-pay__network {
        transition: none;
    }
}
