/*
 * Ropay Gateway UI
 * Shared design system for all customer-facing checkout pages.
 */

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../vendor/inter/inter-latin-wght-normal.woff2") format("woff2-variations"),
         url("../vendor/inter/inter-latin-wght-normal.woff2") format("woff2");
}

:root {
    --rp-brand: #0b5e73;
    --rp-brand-600: #094c5d;
    --rp-brand-700: #073c4a;
    --rp-brand-50: #e8f3f5;
    --rp-brand-100: #cfe6eb;
    --rp-accent: #d4a514;
    --rp-accent-50: #fbf5e1;

    --rp-ink: #0f1d2b;
    --rp-body: #334354;
    --rp-muted: #687789;
    --rp-line: #e3e8ee;
    --rp-line-strong: #cfd7e0;
    --rp-bg: #f4f6f9;
    --rp-surface: #ffffff;

    --rp-success: #12805c;
    --rp-success-50: #e7f6ef;
    --rp-danger: #c4352b;
    --rp-danger-50: #fdeceb;
    --rp-info-50: #eaf2fd;

    --rp-radius-sm: 8px;
    --rp-radius: 12px;
    --rp-radius-lg: 16px;
    --rp-shadow-sm: 0 1px 2px rgba(15, 29, 43, .06);
    --rp-shadow: 0 1px 3px rgba(15, 29, 43, .06), 0 8px 24px rgba(15, 29, 43, .06);
    --rp-shadow-lg: 0 2px 6px rgba(15, 29, 43, .05), 0 20px 48px rgba(15, 29, 43, .12);
    --rp-focus: 0 0 0 4px rgba(11, 94, 115, .16);

    --rp-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --rp-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ---------- Base ---------- */

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

html {
    -webkit-text-size-adjust: 100%;
}

body.rp {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--rp-bg);
    color: var(--rp-body);
    font-family: var(--rp-font);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.rp h1,
.rp h2,
.rp h3,
.rp h4,
.rp h5 {
    margin: 0;
    color: var(--rp-ink);
    font-weight: 650;
    letter-spacing: -.015em;
    line-height: 1.25;
}

.rp p {
    margin: 0;
}

.rp a {
    color: var(--rp-brand);
    text-decoration: none;
}

.rp a:hover {
    color: var(--rp-brand-700);
    text-decoration: underline;
}

.rp img {
    max-width: 100%;
}

.rp-main {
    flex: 1 0 auto;
}

.rp-container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 20px;
}

.rp-container--narrow {
    max-width: 560px;
}

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

/* ---------- Top bar ---------- */

.rp-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(180%) blur(10px);
    -webkit-backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--rp-line);
}

.rp-topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.rp-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--rp-ink) !important;
    text-decoration: none !important;
}

.rp-brand__mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 0 0 1px var(--rp-line);
}

.rp-brand__name {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -.02em;
}

.rp-brand__name span {
    color: var(--rp-brand);
}

.rp-secure-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--rp-success-50);
    color: var(--rp-success);
    font-size: 13px;
    font-weight: 600;
}

/* ---------- Hero band ---------- */

.rp-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(1200px 400px at 85% -20%, rgba(212, 165, 20, .22), transparent 60%),
        radial-gradient(900px 400px at -10% 120%, rgba(18, 128, 92, .35), transparent 60%),
        linear-gradient(135deg, var(--rp-brand-700) 0%, var(--rp-brand) 100%);
    color: #fff;
    padding: 48px 0 96px;
}

.rp-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, .6), transparent);
    -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, .6), transparent);
    pointer-events: none;
}

.rp-hero > * {
    position: relative;
    z-index: 1;
}

.rp-hero--compact {
    padding: 32px 0 88px;
}

.rp-hero h1 {
    color: #fff;
    font-size: clamp(26px, 4vw, 36px);
    font-weight: 700;
}

.rp-hero p {
    color: rgba(255, 255, 255, .78);
    font-size: 16px;
    margin-top: 8px;
}

.rp-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.rp-overlap {
    margin-top: -64px;
    position: relative;
    z-index: 2;
}

/* ---------- Search ---------- */

.rp-search {
    display: flex;
    align-items: center;
    max-width: 560px;
    margin-top: 24px;
    padding: 6px;
    background: #fff;
    border-radius: var(--rp-radius);
    box-shadow: var(--rp-shadow-lg);
}

.rp-search__icon {
    padding: 0 6px 0 12px;
    color: var(--rp-muted);
}

.rp-search input {
    flex: 1;
    min-width: 0;
    height: 44px;
    padding: 0 8px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--rp-ink);
    font: inherit;
    font-size: 15px;
}

.rp-search input::placeholder {
    color: #97a3b1;
}

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

.rp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    padding: 0 22px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: var(--rp-brand);
    color: #fff !important;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none !important;
    cursor: pointer;
    transition: background-color .15s ease, box-shadow .15s ease, transform .05s ease;
    -webkit-appearance: none;
    appearance: none;
}

.rp-btn:hover {
    background: var(--rp-brand-600);
}

.rp-btn:active {
    transform: translateY(1px);
}

.rp-btn:focus-visible {
    outline: 0;
    box-shadow: var(--rp-focus);
}

.rp-btn--block {
    width: 100%;
}

.rp-btn--sm {
    height: 40px;
    padding: 0 16px;
    font-size: 14px;
}

.rp-btn--ghost {
    background: transparent;
    border-color: var(--rp-line-strong);
    color: var(--rp-ink) !important;
}

.rp-btn--ghost:hover {
    background: #f7f9fb;
}

.rp-btn--success {
    background: var(--rp-success);
}

.rp-btn--success:hover {
    background: #0e6a4c;
}

.rp-btn .rp-spinner {
    display: none;
}

.rp-btn.is-loading {
    pointer-events: none;
    opacity: .85;
}

.rp-btn.is-loading .rp-spinner {
    display: inline-block;
}

.rp-btn.is-loading .rp-btn__icon {
    display: none;
}

.rp-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, .45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: rp-spin .7s linear infinite;
}

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

.rp-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
}

/* ---------- Cards ---------- */

.rp-card {
    background: var(--rp-surface);
    border: 1px solid var(--rp-line);
    border-radius: var(--rp-radius-lg);
    box-shadow: var(--rp-shadow);
}

.rp-card__body {
    padding: 28px;
}

.rp-card__header {
    padding: 22px 28px;
    border-bottom: 1px solid var(--rp-line);
}

.rp-card__footer {
    padding: 16px 28px;
    border-top: 1px solid var(--rp-line);
    background: #fafbfc;
    border-radius: 0 0 var(--rp-radius-lg) var(--rp-radius-lg);
}

.rp-card__title {
    font-size: 18px;
}

.rp-card__subtitle {
    margin-top: 4px !important;
    color: var(--rp-muted);
    font-size: 14px;
}

/* ---------- Section heading ---------- */

.rp-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.rp-section-head h2 {
    font-size: 17px;
}

.rp-count {
    color: var(--rp-muted);
    font-size: 13px;
    font-weight: 500;
}

/* ---------- Merchant / product tiles ---------- */

.rp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 14px;
}

.rp-tile {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 84px;
    padding: 16px;
    background: var(--rp-surface);
    border: 1px solid var(--rp-line);
    border-radius: var(--rp-radius);
    box-shadow: var(--rp-shadow-sm);
    color: var(--rp-ink) !important;
    text-decoration: none !important;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.rp-tile:hover {
    border-color: var(--rp-brand-100);
    box-shadow: var(--rp-shadow);
    transform: translateY(-2px);
}

.rp-tile:focus-visible {
    outline: 0;
    box-shadow: var(--rp-focus);
    border-color: var(--rp-brand);
}

.rp-tile__body {
    flex: 1;
    min-width: 0;
}

.rp-tile__title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.35;
}

.rp-tile__meta {
    margin-top: 4px;
    color: var(--rp-muted);
    font-size: 13px;
}

.rp-tile__price {
    color: var(--rp-ink);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.rp-tile__chevron {
    flex: none;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--rp-bg);
    color: var(--rp-muted);
    font-size: 12px;
    transition: background-color .15s ease, color .15s ease;
}

.rp-tile:hover .rp-tile__chevron {
    background: var(--rp-brand);
    color: #fff;
}

/* Logo avatar with initials fallback (image sits on top of the initials) */
.rp-avatar {
    position: relative;
    flex: none;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    overflow: hidden;
    border-radius: 12px;
    background: var(--rp-brand-50);
    border: 1px solid var(--rp-line);
    color: var(--rp-brand);
    font-weight: 700;
    font-size: 18px;
}

.rp-avatar img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
    padding: 4px;
}

.rp-avatar--lg {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    font-size: 24px;
}

.rp-avatar--icon {
    background: var(--rp-accent-50);
    color: #9a7709;
    font-size: 18px;
}

.rp-empty {
    padding: 48px 24px;
    text-align: center;
    color: var(--rp-muted);
}

.rp-empty i {
    display: block;
    margin-bottom: 12px;
    font-size: 28px;
    color: var(--rp-line-strong);
}

.rp-empty strong {
    display: block;
    color: var(--rp-ink);
    margin-bottom: 4px;
}

/* ---------- Breadcrumb / merchant header ---------- */

.rp-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, .85) !important;
    font-size: 14px;
    font-weight: 500;
}

.rp-back:hover {
    color: #fff !important;
}

.rp-merchant-head {
    display: flex;
    align-items: center;
    gap: 18px;
}

.rp-merchant-head .rp-avatar {
    border: 0;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, .15);
}

/* ---------- Checkout layout ---------- */

.rp-checkout {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 24px;
    align-items: start;
    padding: 32px 0 48px;
}

.rp-checkout--single {
    grid-template-columns: minmax(0, 1fr);
    max-width: 560px;
    margin: 0 auto;
}

.rp-summary {
    position: sticky;
    top: 88px;
}

.rp-summary__merchant {
    display: flex;
    align-items: center;
    gap: 14px;
}

.rp-summary__merchant-name {
    color: var(--rp-muted);
    font-size: 13px;
    font-weight: 500;
}

.rp-summary__product {
    margin-top: 2px;
    color: var(--rp-ink);
    font-size: 16px;
    font-weight: 650;
    line-height: 1.35;
}

.rp-amount {
    margin-top: 24px;
}

.rp-amount__label {
    color: var(--rp-muted);
    font-size: 13px;
    font-weight: 500;
}

.rp-amount__value {
    margin-top: 2px;
    color: var(--rp-ink);
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -.02em;
    font-variant-numeric: tabular-nums;
}

.rp-amount__value small {
    margin-right: 4px;
    color: var(--rp-muted);
    font-size: 18px;
    font-weight: 600;
}

.rp-lines {
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
    border-top: 1px dashed var(--rp-line-strong);
}

.rp-lines li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--rp-line);
    font-size: 14px;
}

.rp-lines li span:first-child {
    color: var(--rp-muted);
}

.rp-lines li span:last-child {
    color: var(--rp-ink);
    font-weight: 500;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.rp-lines li.rp-lines__total {
    border-bottom: 0;
    font-size: 16px;
}

.rp-lines li.rp-lines__total span {
    color: var(--rp-ink);
    font-weight: 700;
}

.rp-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-top: 20px;
    color: var(--rp-muted);
    font-size: 12.5px;
}

.rp-trust span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.rp-trust i {
    color: var(--rp-success);
}

/* ---------- Steps ---------- */

.rp-steps {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 24px;
    padding: 0;
    list-style: none;
    counter-reset: rp-step;
}

.rp-steps li {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--rp-muted);
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

.rp-steps li + li::before {
    content: "";
    width: 28px;
    height: 1px;
    margin-right: 0;
    background: var(--rp-line-strong);
}

.rp-steps__dot {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid var(--rp-line-strong);
    background: #fff;
    font-size: 12px;
    font-weight: 600;
}

.rp-steps li.is-active {
    color: var(--rp-ink);
}

.rp-steps li.is-active .rp-steps__dot {
    border-color: var(--rp-brand);
    background: var(--rp-brand);
    color: #fff;
}

.rp-steps li.is-done .rp-steps__dot {
    border-color: var(--rp-success);
    background: var(--rp-success);
    color: #fff;
}

/* ---------- Forms ---------- */

.rp-field {
    margin-bottom: 18px;
}

fieldset.rp-field {
    min-width: 0;
    margin: 0 0 22px;
    padding: 0;
    border: 0;
}

fieldset.rp-field legend {
    padding: 0;
}

.rp-label {
    display: block;
    margin-bottom: 6px;
    color: var(--rp-ink);
    font-size: 13.5px;
    font-weight: 600;
}

.rp-label .rp-req {
    color: var(--rp-danger);
    margin-left: 2px;
}

.rp-hint {
    margin-top: 6px !important;
    color: var(--rp-muted);
    font-size: 12.5px;
}

.rp-input {
    display: block;
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1px solid var(--rp-line-strong);
    border-radius: 10px;
    background: #fff;
    color: var(--rp-ink);
    font: inherit;
    font-size: 15px;
    transition: border-color .15s ease, box-shadow .15s ease;
    -webkit-appearance: none;
    appearance: none;
}

.rp-input::placeholder {
    color: #a3aebb;
}

.rp-input:hover {
    border-color: #b5c0cc;
}

.rp-input:focus {
    outline: 0;
    border-color: var(--rp-brand);
    box-shadow: var(--rp-focus);
}

.rp-input[readonly] {
    background: #f6f8fa;
    color: var(--rp-body);
    cursor: default;
}

.rp-input-wrap {
    position: relative;
}

.rp-input-wrap > i,
.rp-input-wrap > .rp-input-prefix {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--rp-muted);
    font-size: 14px;
    pointer-events: none;
}

.rp-input-wrap > .rp-input-prefix {
    font-weight: 600;
    font-size: 13px;
}

.rp-input-wrap > .rp-input {
    padding-left: 42px;
}

.rp-input-wrap--prefix > .rp-input {
    padding-left: 54px;
    font-variant-numeric: tabular-nums;
}

.rp-input--otp {
    height: 60px;
    text-align: center;
    font-family: var(--rp-mono);
    font-size: 26px;
    font-weight: 600;
    letter-spacing: .5em;
    padding-left: calc(14px + .5em);
}

.rp-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
}

/* Payment method tiles (radio inputs keep name="payment_option") */
.rp-methods {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
    padding: 0;
    border: 0;
}

.rp-method {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 60px;
    padding: 10px 14px;
    border: 1px solid var(--rp-line-strong);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.rp-method:hover {
    border-color: #b5c0cc;
}

.rp-method input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    /* keeps native "required" validation bubble anchored to the tile */
    left: 50%;
    bottom: 0;
}

.rp-method__logo {
    flex: none;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    overflow: hidden;
    border-radius: 8px;
    background: #fff;
    border: 1px solid var(--rp-line);
}

.rp-method__logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.rp-method__logo--text {
    background: var(--rp-bg);
    color: var(--rp-ink);
    font-size: 16px;
    font-weight: 700;
}

.rp-method__logo--cards {
    width: auto;
    padding: 0 6px;
    gap: 4px;
    display: flex;
    font-size: 22px;
}

.rp-method__logo--cards .fa-cc-visa {
    color: #1a1f71;
}

.rp-method__logo--cards .fa-cc-mastercard {
    color: #eb001b;
}

.rp-method__name {
    flex: 1;
    min-width: 0;
    color: var(--rp-ink);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.25;
}

.rp-method__name small {
    display: block;
    color: var(--rp-muted);
    font-size: 12px;
    font-weight: 500;
}

.rp-method__check {
    flex: none;
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--rp-line-strong);
    border-radius: 50%;
    transition: border-color .15s ease, border-width .15s ease;
}

.rp-method input:checked ~ .rp-method__check {
    border-color: var(--rp-brand);
    border-width: 5px;
}

.rp-method:has(input:checked) {
    border-color: var(--rp-brand);
    background: var(--rp-brand-50);
    box-shadow: 0 0 0 1px var(--rp-brand);
}

.rp-method input:focus-visible ~ .rp-method__check {
    box-shadow: var(--rp-focus);
}

.rp-divider {
    height: 1px;
    margin: 24px 0;
    background: var(--rp-line);
    border: 0;
}

.rp-legal {
    margin-top: 14px !important;
    color: var(--rp-muted);
    font-size: 12.5px;
    text-align: center;
}

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

.rp-notice {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 10px;
    background: var(--rp-info-50);
    color: var(--rp-body);
    font-size: 14px;
}

.rp-notice > i {
    margin-top: 3px;
    color: var(--rp-brand);
}

.rp-notice--success {
    background: var(--rp-success-50);
}

.rp-notice--success > i {
    color: var(--rp-success);
}

.rp-notice--danger {
    background: var(--rp-danger-50);
}

.rp-notice--danger > i {
    color: var(--rp-danger);
}

.rp-notice strong {
    color: var(--rp-ink);
}

.rp-status {
    text-align: center;
}

.rp-status__icon {
    position: relative;
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: var(--rp-brand-50);
    color: var(--rp-brand);
    font-size: 28px;
}

.rp-status__icon--pulse::before {
    content: "";
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px solid var(--rp-brand-100);
    animation: rp-pulse 1.8s ease-out infinite;
}

@keyframes rp-pulse {
    0% {
        transform: scale(.85);
        opacity: 1;
    }

    100% {
        transform: scale(1.25);
        opacity: 0;
    }
}

.rp-status h2 {
    font-size: 22px;
}

.rp-status p {
    margin-top: 8px;
    color: var(--rp-muted);
}

.rp-ussd {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: rp-ussd;
}

.rp-ussd li {
    position: relative;
    padding: 6px 0 6px 34px;
    font-size: 14px;
    counter-increment: rp-ussd;
}

.rp-ussd li::before {
    content: counter(rp-ussd);
    position: absolute;
    left: 0;
    top: 6px;
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--rp-line-strong);
    color: var(--rp-ink);
    font-size: 12px;
    font-weight: 600;
}

.rp-ussd code {
    padding: 1px 6px;
    border-radius: 4px;
    background: #fff;
    border: 1px solid var(--rp-line);
    color: var(--rp-ink);
    font-family: var(--rp-mono);
    font-size: 13px;
}

.rp-details {
    margin-top: 16px;
    border: 1px solid var(--rp-line);
    border-radius: 10px;
    background: #fafbfc;
    text-align: left;
}

.rp-details summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    color: var(--rp-ink);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}

.rp-details summary::-webkit-details-marker {
    display: none;
}

.rp-details summary i {
    color: var(--rp-muted);
    transition: transform .15s ease;
}

.rp-details[open] summary i {
    transform: rotate(180deg);
}

.rp-details__body {
    padding: 0 16px 14px;
}

.rp-result {
    padding: 18px;
    border-radius: 10px;
    background: #fafbfc;
    border: 1px solid var(--rp-line);
    color: var(--rp-ink);
    font-size: 14px;
    line-height: 1.6;
    word-break: break-word;
}

/* ---------- Footer ---------- */

.rp-footer {
    flex-shrink: 0;
    margin-top: 32px;
    padding: 28px 0;
    border-top: 1px solid var(--rp-line);
    background: #fff;
    color: var(--rp-muted);
    font-size: 13px;
}

.rp-footer__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.rp-footer__links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
}

.rp-footer__links a {
    color: var(--rp-muted);
}

.rp-footer__links a:hover {
    color: var(--rp-ink);
}

.rp-footer__methods {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rp-footer__methods img {
    width: 30px;
    height: 30px;
    object-fit: contain;
    border-radius: 6px;
    border: 1px solid var(--rp-line);
    background: #fff;
}

.rp-footer__methods i {
    font-size: 26px;
    color: #8592a1;
}

.rp-powered {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ---------- Data table ---------- */

.rp-table-wrap {
    overflow-x: auto;
}

.rp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.rp-table th {
    padding: 12px 16px;
    border-bottom: 1px solid var(--rp-line);
    background: #fafbfc;
    color: var(--rp-muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.rp-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--rp-line);
    color: var(--rp-ink);
}

.rp-table tr:last-child td {
    border-bottom: 0;
}

.rp-table .rp-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.rp-pill {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--rp-success-50);
    color: var(--rp-success);
    font-size: 12.5px;
    font-weight: 600;
}

.rp-pill--low {
    background: var(--rp-danger-50);
    color: var(--rp-danger);
}

/* ---------- SweetAlert2 theme ---------- */

.swal2-popup {
    border-radius: var(--rp-radius-lg) !important;
    font-family: var(--rp-font) !important;
    padding: 28px 24px 24px !important;
}

.swal2-title {
    color: var(--rp-ink) !important;
    font-size: 21px !important;
    font-weight: 650 !important;
}

.swal2-html-container,
.swal2-content {
    color: var(--rp-muted) !important;
    font-size: 15px !important;
}

.swal2-styled.swal2-confirm {
    min-width: 140px;
    height: 44px;
    border-radius: 10px !important;
    background: var(--rp-brand) !important;
    background-color: var(--rp-brand) !important;
    font-size: 15px !important;
    font-weight: 600 !important;
}

.swal2-styled.swal2-confirm:focus {
    box-shadow: var(--rp-focus) !important;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
    .rp-checkout {
        grid-template-columns: minmax(0, 1fr);
        padding-top: 20px;
    }

    .rp-summary {
        position: static;
    }
}

@media (max-width: 600px) {
    body.rp {
        font-size: 14.5px;
    }

    .rp-container {
        padding: 0 16px;
    }

    .rp-topbar__inner {
        height: 58px;
    }

    .rp-secure-badge span {
        display: none;
    }

    .rp-hero {
        padding: 32px 0 84px;
    }

    .rp-card__body {
        padding: 20px;
    }

    .rp-card__header,
    .rp-card__footer {
        padding-left: 20px;
        padding-right: 20px;
    }

    .rp-row-2,
    .rp-methods {
        grid-template-columns: minmax(0, 1fr);
    }

    .rp-steps li + li::before {
        width: 14px;
    }

    .rp-steps__label {
        display: none;
    }

    .rp-steps li.is-active .rp-steps__label {
        display: inline;
    }

    .rp-footer__inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .rp-merchant-head .rp-avatar--lg {
        width: 56px;
        height: 56px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}
