/* ============================================================
   GlobalPay — Public Styles
   ============================================================ */

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

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

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

.globalpay-header-flex {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.globalpay-header-text {
    min-width: 0;
    flex: 1;
}

.globalpay-eyebrow {
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .6px;
    opacity: .7;
    color: #fff;
    margin-bottom: 8px;
}

.globalpay-header-logo-box {
    flex-shrink: 0;
    background: #fff;
    border-radius: 8px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.globalpay-header-logo-box img {
    max-height: 40px;
    max-width: 120px;
    display: block;
    object-fit: contain;
}

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

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

/* Inline shortcode form wrapper */
.globalpay-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;
}

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

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

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

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

.globalpay-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;
}

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

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

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

.globalpay-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;
}

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

/* Primary button */
.globalpay-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;
}

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

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

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

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

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

/* ============================================================
   GlobalPay — Admin Styles
   ============================================================ */

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

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

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

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

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

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

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

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

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

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

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

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

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

.globalpay-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;
}

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

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

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

.globalpay-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) ────────────────────────── */

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

.globalpay-price-display {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
}

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

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

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

.globalpay-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 ───────────────────────────────────────────────── */

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

.globalpay-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;
}

.globalpay-currency-dropdown:focus,
.globalpay-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 */
.globalpay-convert-preview { display: none; }

/* ── Gateway badge (Paystack / Flutterwave) ──────────────────────────────── */

.globalpay-gw-badge {
    font-size: 12px;
    color: #718096;
    text-align: center;
    margin: -6px 0 14px;
}

.globalpay-gw-badge strong {
    color: #011B33;
}

/* ── Branding: logo, company name, footer ────────────────────────────────── */

.globalpay-brand {
    text-align: center;
    margin-bottom: 16px;
}

.globalpay-brand-logo {
    max-height: 44px;
    max-width: 200px;
}

.globalpay-brand-name {
    font-size: 18px;
    font-weight: 800;
    color: #011B33;
}

/* Note: the dark card header now uses .globalpay-header-logo-box for the
   logo (see above) and .globalpay-eyebrow for the company name, so no
   separate --dark logo/name variants are needed here anymore. */

.globalpay-powered-by {
    text-align: center;
    color: #C4CCD8;
    font-size: 11px;
    margin: -12px 0 16px;
}

/* ── Drag-and-drop page content blocks ───────────────────────────────────── */

.globalpay-blocks {
    padding: 24px 32px 4px;
}

.globalpay-block {
    margin-bottom: 18px;
}

.globalpay-block--text.globalpay-text--small   { font-size: 13px; color: #4A5568; }
.globalpay-block--text.globalpay-text--normal  { font-size: 15px; color: #2D3748; }
.globalpay-block--text.globalpay-text--large   { font-size: 18px; color: #2D3748; }
.globalpay-block--text.globalpay-text--heading { font-size: 24px; font-weight: 800; color: #011B33; }
.globalpay-block--text { line-height: 1.6; }

.globalpay-block-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

.globalpay-video-embed {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    border-radius: 8px;
    overflow: hidden;
}

.globalpay-video-embed iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: 0;
}

.globalpay-block-video-tag {
    width: 100%;
    border-radius: 8px;
}

/* A video/image sitting right under the header acts as hero media — bleed
   it edge-to-edge instead of sitting inside the normal content padding. */
.globalpay-blocks > .globalpay-block--video:first-child,
.globalpay-blocks > .globalpay-block--image:first-child {
    margin: -24px -32px 18px;
}
.globalpay-blocks > .globalpay-block--video:first-child .globalpay-video-embed,
.globalpay-blocks > .globalpay-block--video:first-child .globalpay-block-video-tag,
.globalpay-blocks > .globalpay-block--image:first-child .globalpay-block-image {
    border-radius: 0;
}

.globalpay-block--columns {
    display: flex;
    gap: 20px;
}

.globalpay-block--columns .globalpay-col {
    flex: 1;
    min-width: 0;
}

@media (max-width: 480px) {
    .globalpay-block--columns { flex-direction: column; }

    /* Currency selector visibility fix: on narrow screens, a large price
       amount can outgrow the row and push the dropdown out of view (it
       gets clipped since the card has overflow:hidden). Shrinking the
       price text helps it fit, and letting the pill take its own full
       width if it still doesn't fit makes it impossible to miss. */
    .globalpay-price-symbol { font-size: 18px; }
    .globalpay-price-amount { font-size: 26px; }
    .globalpay-currency-pill { flex: 1 1 100%; }
    .globalpay-currency-dropdown { width: 100%; text-align: left; }
}
