:root {
    --page-bg: #edf1f8;
    --top-bg: #ffffff;
    --text: #121523;
    --muted: #647093;
    --line: #c4cef5;
    --field: #ffffff;
    --blue: #1264f6;
    --blue-deep: #153b99;
    --blue-soft: #6978f7;
    --red: #e12654;
    --error: #d51f45;
    --shadow: rgba(22, 35, 74, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.48), rgba(255, 255, 255, 0)),
        var(--page-bg);
}

button,
input,
select {
    font: inherit;
}

.topbar {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    border-top: 4px solid #202020;
    background: var(--top-bg);
}

.brand-lockup {
    display: inline-flex;
    align-items: center;
}

.rapay-logo-image,
.rapay-mark {
    display: block;
    max-width: 100%;
    object-fit: contain;
}

.menu-button {
    width: 28px;
    height: 28px;
    display: grid;
    gap: 3px;
    place-content: center;
    border: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
}

.menu-button span {
    width: 17px;
    height: 2px;
    border-radius: 999px;
    background: var(--blue-soft);
}

.payment-page {
    min-height: calc(100vh - 60px);
    display: grid;
    place-items: start center;
    padding: 118px 18px 56px;
}

.payment-shell {
    width: min(690px, 100%);
    display: grid;
    justify-items: center;
}

.ra-logo {
    width: min(490px, 88vw);
    display: grid;
    justify-items: center;
    margin-bottom: 86px;
}

.rapay-logo-header {
    width: 106px;
    height: auto;
}

.rapay-logo-hero {
    width: 490px;
    height: auto;
}

.payment-form {
    width: 100%;
    display: grid;
    gap: 28px;
}

.form-grid {
    display: grid;
    grid-template-columns: minmax(0, 328px) minmax(160px, 329px);
    gap: 18px 32px;
    align-items: end;
}

#amount-input,
#payer-name-input,
#payer-phone-input {
    width: 100%;
    height: 50px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0 16px;
    color: #34436e;
    background: var(--field);
    outline: 0;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 10px 26px rgba(28, 48, 104, 0.04);
}

#amount-input::placeholder,
#payer-name-input::placeholder,
#payer-phone-input::placeholder {
    color: #53628e;
    opacity: 1;
}

#amount-input:focus,
#payer-name-input:focus,
#payer-phone-input:focus {
    border-color: var(--blue-soft);
    box-shadow: 0 0 0 4px rgba(18, 100, 246, 0.1);
}

.field-amount {
    grid-column: 1;
}

.currency {
    height: 36px;
    display: flex;
    align-items: flex-start;
    border-bottom: 1px solid #141414;
    border-top: 0;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    background: transparent;
    color: #050505;
    font-size: 16px;
    font-weight: 900;
    outline: 0;
}

.conversion-note {
    min-height: 22px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.consent-row {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #35436f;
    font-size: 13px;
    font-weight: 700;
}

.consent-row input {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    accent-color: var(--blue);
}

.create-button {
    width: 100%;
    height: 49px;
    border: 0;
    border-radius: 10px;
    color: #fff;
    background: linear-gradient(90deg, var(--blue), #0a58e8);
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 16px 34px rgba(18, 100, 246, 0.2);
}

.create-button:disabled {
    opacity: 0.72;
    cursor: wait;
}

.loader,
.form-error {
    margin: 18px 0 0;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
}

.loader {
    color: #33457f;
}

.form-error {
    color: var(--error);
}

.qr-result {
    margin-top: 26px;
}

.qr-card {
    width: min(312px, 100%);
    display: grid;
    justify-items: center;
    gap: 11px;
    padding: 20px;
    border: 1px solid rgba(196, 206, 245, 0.72);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 18px 44px var(--shadow);
}

.rapay-mark-card {
    width: 150px;
    height: auto;
}

.qr-card img {
    width: 190px;
    height: 190px;
    object-fit: contain;
    image-rendering: pixelated;
}

.qr-card strong {
    font-size: 20px;
}

.qr-card small {
    max-width: 100%;
    color: #66708d;
    font-size: 12px;
    overflow-wrap: anywhere;
    text-align: center;
}

.qr-card a {
    color: var(--blue);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.rapay-mark-footer {
    width: 128px;
    height: auto;
    margin-top: 34px;
}

[hidden] {
    display: none !important;
}

@media (max-width: 720px) {
    .payment-page {
        padding-top: 78px;
    }

    .ra-logo {
        margin-bottom: 58px;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .currency {
        height: 30px;
    }
}

@media (max-width: 420px) {
    .ra-logo {
        width: min(320px, 88vw);
    }

    .rapay-logo-header {
        width: 104px;
    }
}
