/* ============================================================
   AfriPay — Public Styles
   ============================================================ */

/* Page wrapper for /pay/ links */
.afripay-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
    background: #F5F7FA;
}

.afripay-card {
    width: 100%;
    max-width: 460px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,.1);
    overflow: hidden;
}

.afripay-card__header {
    background: #011B33;
    color: #fff;
    padding: 28px 32px 24px;
}

.afripay-card__title {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 700;
    color: #fff;
}

.afripay-card__desc {
    margin: 0;
    font-size: 14px;
    opacity: .8;
    color: #fff;
}

/* Inline shortcode form wrapper */
.afripay-form-wrap {
    max-width: 460px;
    background: #fff;
    border: 1px solid #e5e9f0;
    border-radius: 12px;
    padding: 28px 32px;
    margin: 0 auto;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.afripay-form-title {
    margin: 0 0 20px;
    font-size: 18px;
    font-weight: 700;
    color: #011B33;
}

.afripay-form {
    padding: 28px 32px 24px;
}

/* Fields */
.afripay-field {
    margin-bottom: 16px;
}

.afripay-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #4A5568;
    margin-bottom: 6px;
}

.afripay-field input {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 14px;
    border: 1.5px solid #D1D9E6;
    border-radius: 8px;
    font-size: 15px;
    color: #011B33;
    outline: none;
    transition: border-color .15s;
}

.afripay-field input:focus {
    border-color: #00C3F7;
}

/* Fixed amount display */
.afripay-amount-display {
    font-size: 28px;
    font-weight: 800;
    color: #011B33;
    margin-bottom: 20px;
    text-align: center;
    letter-spacing: -0.5px;
}

/* Preset donation amounts */
.afripay-presets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.afripay-preset {
    padding: 10px 4px;
    border: 2px solid #D1D9E6;
    border-radius: 8px;
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    color: #011B33;
    cursor: pointer;
    transition: all .15s;
}

.afripay-preset:hover,
.afripay-preset.active {
    border-color: #00C3F7;
    background: #E8F9FE;
    color: #0098BE;
}

/* Primary button */
.afripay-btn {
    display: block;
    width: 100%;
    padding: 14px;
    background: #011B33;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 8px;
    letter-spacing: 0.2px;
    transition: background .15s;
}

.afripay-btn:hover { background: #00C3F7; color: #011B33; }
.afripay-btn:disabled { opacity: .6; cursor: not-allowed; }

/* Message */
.afripay-msg {
    margin-top: 14px;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    text-align: center;
}

.afripay-msg.is-error   { background: #FEF0F0; color: #C0392B; border: 1px solid #FCC; }
.afripay-msg.is-success { background: #EAFAF1; color: #1A7A4A; border: 1px solid #ACE4C2; }

/* Alert box */
.afripay-alert { padding: 12px 16px; border-radius: 6px; margin: 16px 32px; font-size: 13px; }
.afripay-alert--error { background: #FEF0F0; color: #C0392B; border: 1px solid #FCC; }

/* Secure badge */
.afripay-secure { text-align: center; color: #A0AEC0; font-size: 12px; padding-bottom: 20px; margin: 0; }

/* ============================================================
   AfriPay — Admin Styles
   ============================================================ */

.afripay-admin h1 { color: #011B33; }

.afripay-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin: 20px 0;
}

.afripay-stat {
    background: #fff;
    border: 1px solid #E5E9F0;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
}

.afripay-stat__value {
    display: block;
    font-size: 28px;
    font-weight: 800;
    color: #011B33;
}

.afripay-stat__label {
    display: block;
    font-size: 12px;
    color: #718096;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Status badges */
.afripay-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: capitalize;
}

.afripay-badge--success  { background: #D4EDDA; color: #155724; }
.afripay-badge--pending  { background: #FFF3CD; color: #856404; }
.afripay-badge--failed   { background: #F8D7DA; color: #721C24; }
.afripay-badge--on-hold  { background: #D1ECF1; color: #0C5460; }
.afripay-badge--active   { background: #D4EDDA; color: #155724; }
.afripay-badge--cancelled{ background: #E2E8F0; color: #4A5568; }
.afripay-badge--past_due { background: #FFF3CD; color: #856404; }

.afripay-type {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    background: #EDF2F7;
    color: #4A5568;
    font-weight: 600;
}
.afripay-type--donation { background: #FEF0F0; color: #C0392B; }

/* Webhook info box */
.afripay-webhook-info {
    margin-top: 24px;
    background: #F7FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    padding: 16px;
}

/* Two column layout */
.afripay-two-col {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 32px;
    margin-top: 16px;
}

.afripay-form-box {
    background: #fff;
    border: 1px solid #E5E9F0;
    border-radius: 10px;
    padding: 20px;
}

/* ── Currency selector ───────────────────────────────────────────────────── */

.afripay-field--currency {
    margin-bottom: 18px;
}

.afripay-select {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 14px;
    border: 1.5px solid #D1D9E6;
    border-radius: 8px;
    font-size: 15px;
    color: #011B33;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23718096' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 14px center;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    outline: none;
    cursor: pointer;
    transition: border-color .15s;
}

.afripay-select:focus {
    border-color: #00C3F7;
}

/* ── Real-time conversion preview ────────────────────────────────────────── */

.afripay-convert-preview {
    min-height: 22px;
    margin: -8px 0 14px;
    font-size: 12px;
    color: #718096;
    text-align: right;
    letter-spacing: 0.2px;
    transition: opacity .2s;
}

.afripay-convert-preview span {
    background: #F0F9FF;
    color: #0369A1;
    border: 1px solid #BAE6FD;
    border-radius: 4px;
    padding: 2px 8px;
    font-weight: 500;
}

/* ── Price row (currency pill + converted amount) ────────────────────────── */

.afripay-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 22px;
    padding: 18px 20px;
    background: #EEF2FF;
    border-radius: 12px;
}

.afripay-price-display {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex: 1;
}

.afripay-price-symbol {
    font-size: 22px;
    font-weight: 800;
    color: #011B33;
    line-height: 1;
}

.afripay-price-amount {
    font-size: 32px;
    font-weight: 800;
    color: #011B33;
    letter-spacing: -1px;
    line-height: 1;
    transition: opacity .2s;
}

.afripay-price-amount.loading {
    opacity: .4;
}

.afripay-price-tag {
    font-size: 12px;
    font-weight: 500;
    color: #718096;
    background: #fff;
    border-radius: 20px;
    padding: 3px 9px;
    margin-left: 4px;
    white-space: nowrap;
}

/* ── Currency pill dropdown ───────────────────────────────────────────────── */

.afripay-currency-pill {
    flex-shrink: 0;
}

.afripay-currency-dropdown {
    appearance: none;
    -webkit-appearance: none;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23718096' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 10px center;
    border: 1.5px solid #D1D9E6;
    border-radius: 8px;
    padding: 8px 28px 8px 12px;
    font-size: 14px;
    font-weight: 700;
    color: #011B33;
    cursor: pointer;
    outline: none;
    min-width: 80px;
    transition: border-color .15s, box-shadow .15s;
}

.afripay-currency-dropdown:focus,
.afripay-currency-dropdown:hover {
    border-color: #00C3F7;
    box-shadow: 0 0 0 3px rgba(0,195,247,.15);
}

/* Remove old convert-preview since price row replaces it */
.afripay-convert-preview { display: none; }
