@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&family=Open+Sans:wght@400;500;600;700&display=swap');

/* ── Reset & base ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --brand:       #0a4aca;
    --brand-dark:  #0038a9;
    --success:     #057a55;
    --success-bg:  #def7ec;
    --error:       #c81e1e;
    --error-bg:    #fde8e8;
    --pending:     #92400e;
    --pending-bg:  #fef3c7;
    --text:        #111827;
    --muted:       #6b7280;
    --border:      #e5e7eb;
    --bg:          #f3f4f6;
    --white:       #ffffff;
    --radius:      12px;
    --shadow:      0 4px 24px rgba(0,0,0,.08);
}

body {
    font-family: 'Open Sans', sans-serif;
    font-size: 11px;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem 1rem 3rem;
    line-height: 1.5;
}

/* ── Layout ─────────────────────────────────────────────── */
.container {
    width: 100%;
    max-width: 480px;
}

/* ── Header ─────────────────────────────────────────────── */
.page-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.logo-wrap {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--brand);
}

.logo-icon { font-size: 1.8rem; }

.header-sub {
    margin-top: .25rem;
    font-size: .85rem;
    color: var(--muted);
    letter-spacing: .04em;
    text-transform: uppercase;
}

/* ── Card ────────────────────────────────────────────────── */
.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2rem;
}

.section-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: var(--text);
}

/* ── Detail rows ─────────────────────────────────────────── */
.detail-section { margin-bottom: 1rem; }

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: .55rem 0;
    border-bottom: 1px solid var(--border);
    gap: 1rem;
}
.detail-row:last-child { border-bottom: none; }

.label {
    font-size: .82rem;
    color: var(--muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.value {
    font-size: .92rem;
    font-weight: 500;
    text-align: right;
    word-break: break-all;
}

.value.mono { font-family: 'Consolas', monospace; font-size: .85rem; }

/* ── Amount box ──────────────────────────────────────────── */
.amount-box {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1.25rem 0;
}

.amount-box.small { margin: 1rem 0 .5rem; }

.amount-label { font-size: .85rem; color: var(--muted); }

.amount-value {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--brand);
}

.amount-box.small .amount-value { font-size: 1.1rem; }

/* ── Registration CTA card ──────────────────────────────────── */
.reg-cta-card {
    display: block;
    text-decoration: none;
    color: inherit;
    text-align: center;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s;
}

.reg-cta-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 32px rgba(0,0,0,.14);
}

.reg-cta-icon {
    font-size: 2.2rem;
    margin-bottom: .75rem;
}

.reg-cta-card h2 {
    font-size: 1.2rem;
    margin-bottom: .5rem;
}

.reg-cta-sub {
    font-size: .99rem;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.reg-cta-arrow {
    display: inline-block;
    padding: .8rem 1.75rem;
    background: var(--brand);
    color: var(--white);
    font-weight: 600;
    font-size: .95rem;
    border-radius: 8px;
    transition: background .2s;
}

.reg-cta-card:hover .reg-cta-arrow { background: var(--brand-dark); }

/* ── Gateway picker ──────────────────────────────────────── */
.gateway-picker {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: .6rem;
    margin: 1.25rem 0;
}

.gateway-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    text-align: center;
    padding: 1rem .5rem;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    font-size: .85rem;
    font-weight: 600;
    color: var(--text);
    transition: border-color .15s, background .15s;
}

.gateway-fee-note {
    font-size: .72rem;
    font-weight: 500;
    color: var(--muted);
}
.gateway-option.selected .gateway-fee-note { color: var(--brand); }

.gateway-option input { position: absolute; opacity: 0; pointer-events: none; }

.gateway-option:hover { border-color: var(--brand); }

.gateway-option.selected {
    border-color: var(--brand);
    background: #eff6ff;
    color: var(--brand);
}

.gateway-icons {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: .5rem;
}

.card-icon {
    width: 60px;
    height: auto;
    display: block;
    border-radius: 4px;
}

/* ── Pay button ──────────────────────────────────────────── */
.btn-pay {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    width: 100%;
    padding: .9rem 1.5rem;
    background: var(--brand);
    color: var(--white);
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background .2s;
}

.btn-pay:hover  { background: var(--brand-dark); }
.btn-pay:active { transform: scale(.99); }
.btn-pay:disabled { opacity: .65; cursor: not-allowed; }

/* ── Spinner ─────────────────────────────────────────────── */
.spinner {
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255,255,255,.35);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin .7s linear infinite;
}

.spinner.hidden { display: none; }

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

/* ── Secure note ─────────────────────────────────────────── */
.secure-note {
    margin-top: 1rem;
    font-size: .78rem;
    color: var(--muted);
    text-align: center;
    line-height: 1.6;
}

/* ── Payment method logos ────────────────────────────────── */
.payment-logos {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: center;
    margin-top: 1.25rem;
}

.logo-badge {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: .3rem .65rem;
    font-size: .75rem;
    font-weight: 500;
    color: var(--muted);
}

/* ── Status icon ─────────────────────────────────────────── */
.status-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto 1rem;
}

.status-icon.success { background: var(--success-bg); color: var(--success); }
.status-icon.error   { background: var(--error-bg);   color: var(--error);   }
.status-icon.pending { background: var(--pending-bg);  color: var(--pending); }

.card h2 { text-align: center; font-size: 1.2rem; margin-bottom: .9rem; }

.status-message {
    text-align: center;
    color: var(--muted);
    font-size: .9rem;
    margin-bottom: 1.25rem;
}

.error-card h2, .error-msg { text-align: center; }
.error-msg { color: var(--error); font-size: .9rem; margin: .5rem 0 1rem; }

/* ── Hints ───────────────────────────────────────────────── */
.hint {
    font-size: .82rem;
    color: var(--muted);
    text-align: center;
    margin-top: 1rem;
    line-height: 1.6;
}

.hint.success-hint { color: var(--success); }

/* ── Footer ──────────────────────────────────────────────── */
.page-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: .78rem;
    color: var(--muted);
}

/* ── Mobile ──────────────────────────────────────────────── */
@media (max-width: 520px) {
    body { padding: 1rem .75rem 2rem; }
    .card { padding: 1.5rem 1.25rem; }
    .amount-value { font-size: 1.15rem; }
    .gateway-picker { grid-template-columns: 1fr; }
}
