/* ============================================================
   HAHI Donation Plugin Styles v2.1 — Mobile-optimised
   ============================================================ */

/* ---- Donate trigger button ---- */
.npd-donate-trigger { cursor: pointer; transition: all 0.3s ease; }
.npd-donate-btn-default {
    background: #29B80E !important;
    background-image: none !important;
    color: #fff !important;
    border: 2px solid #fff;
    padding: 11px 26px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-block;
    width: auto;
    max-width: 100%;
    box-sizing: border-box;
    white-space: nowrap;
}
.npd-donate-btn-default:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(41,184,14,0.4);
}

@media (max-width: 768px) {
    .npd-donate-btn-default {
        font-size: 14px;
        padding: 10px 22px;
    }
}

@media (max-width: 480px) {
    .npd-donate-btn-default {
        font-size: 12px !important;
        padding: 7px 16px !important;
        border-radius: 20px;
        white-space: nowrap;
    }
}

@media (max-width: 360px) {
    .npd-donate-btn-default {
        font-size: 11px !important;
        padding: 6px 13px !important;
    }
}

/* ============================================================
   DONATION FORM MODAL OVERLAY
   ============================================================ */
.npd-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.75);
    z-index: 999999;
    display: flex; align-items: center; justify-content: center;
    padding: 12px;
    box-sizing: border-box;
}
.npd-modal-container {
    position: relative; width: 100%; max-width: 580px;
    max-height: 92vh; overflow-y: auto;
    animation: slideUp 0.3s ease-out;
    border-radius: 12px;
}
.npd-modal-content {
    background: #fff;
    border-radius: 12px;
    position: relative;
}
.npd-modal-close {
    position: absolute; top: 10px; right: 12px;
    background: transparent; border: none;
    font-size: 26px; line-height: 1; color: #999;
    cursor: pointer; width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; transition: all 0.2s; z-index: 10;
}
.npd-modal-close:hover { background: #f0f0f0; color: #333; }

/* ============================================================
   DONATION FORM (shared inline + modal)
   ============================================================ */
.npd-donation-wrapper { max-width: 580px; margin: 30px auto; padding: 0 16px; }
.npd-donation-form {
    background: #fff; border-radius: 12px; padding: 32px 28px;
    box-shadow: 0 4px 6px rgba(0,0,0,.07), 0 1px 3px rgba(0,0,0,.06);
}
.npd-modal-content .npd-donation-form { box-shadow: none; }

.npd-form-title {
    margin: 0 0 8px; font-size: 22px; font-weight: 700;
    color: #1a1a1a; text-align: center;
}
.npd-form-subtitle {
    margin: 0 0 24px; font-size: 14px; color: #666;
    text-align: center; line-height: 1.5;
}
.npd-form-group { margin-bottom: 18px; }
.npd-label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; color: #333; }
.npd-required { color: #e74c3c; }

/* ---- Campaigns list ---- */
.npd-campaigns-list {
    border: 2px solid #e0e0e0; border-radius: 10px;
    padding: 10px 12px; background: #fafafa;
    max-height: 200px; overflow-y: auto;
}
.npd-campaign-item { margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid #e8e8e8; }
.npd-campaign-item:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.npd-checkbox-label {
    display: flex; flex-direction: column; cursor: pointer;
    padding: 5px; border-radius: 6px; transition: background 0.2s;
}
.npd-checkbox-label:hover { background: #f0f0f0; }
.npd-campaign-checkbox, .npd-campaign-checkbox-modal {
    width: 16px; height: 16px; margin-right: 8px; cursor: pointer; vertical-align: middle;
}
.npd-campaign-name { font-weight: 600; color: #2c3e50; font-size: 13px; display: inline-block; margin-left: 4px; }
.npd-campaign-description { display: block; margin-top: 3px; margin-left: 24px; font-size: 11px; color: #666; line-height: 1.4; }

/* ---- Currency toggle ---- */
.npd-currency-toggle { display: flex; gap: 8px; }
.npd-currency-btn {
    flex: 1; padding: 9px 8px; border: 2px solid #ddd; border-radius: 8px;
    background: #fff; color: #555; font-size: 13px; font-weight: 600;
    cursor: pointer; transition: all 0.2s; text-align: center;
}
.npd-currency-btn.active, .npd-currency-btn:hover {
    border-color: #29B80E; background: #e8f8fd; color: #29B80E;
}

/* ---- Amount input ---- */
.npd-amount-wrapper {
    position: relative; display: flex; align-items: center;
    border: 2px solid #e0e0e0; border-radius: 30px;
    background: #fff; transition: border-color 0.3s;
}
.npd-amount-wrapper:focus-within {
    border-color: #29B80E; box-shadow: 0 0 0 3px rgba(41,184,14,0.12);
}
.npd-currency {
    padding: 0 12px; font-size: 17px; font-weight: 700; color: #2c3e50;
    background: #f8f9fa; border-right: 2px solid #e0e0e0;
    display: flex; align-items: center; height: 48px;
    border-radius: 28px 0 0 28px; white-space: nowrap;
}
.npd-amount-input {
    flex: 1; border: none; padding: 12px 14px; font-size: 16px; font-weight: 600;
    color: #2c3e50; outline: none; border-radius: 0 28px 28px 0; background: transparent;
    min-width: 0;
}
.npd-amount-input::placeholder { color: #aaa; font-weight: 400; }
.npd-text-input {
    width: 100%; padding: 12px 14px; border: 2px solid #e0e0e0;
    border-radius: 30px; font-size: 14px; transition: border-color 0.3s;
    box-sizing: border-box;
}
.npd-text-input:focus {
    outline: none; border-color: #29B80E;
    box-shadow: 0 0 0 3px rgba(41,184,14,0.12);
}
.npd-help-text { margin: 5px 0 0; font-size: 11px; color: #888; }
.npd-error { display: block; margin-top: 4px; font-size: 11px; color: #e74c3c; font-weight: 500; }

/* ---- Donate Now submit button ---- */
.npd-submit-btn {
    width: 100%; padding: 14px 20px;
    background: #29B80E !important; background-image: none !important;
    color: #fff !important;
    border: none !important;
    border-radius: 30px; font-size: 16px; font-weight: 700;
    cursor: pointer; transition: all 0.3s; margin-top: 6px;
    letter-spacing: 0.3px;
}
.npd-submit-btn:hover {
    background: #1f9a0b !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(41,184,14,0.4);
}
.npd-submit-btn:active { transform: translateY(0); }
.npd-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* ---- Close btn ---- */
.npd-close-btn {
    margin-top: 14px; padding: 10px 24px;
    background: #29B80E !important; background-image: none !important;
    color: #fff; border: none; border-radius: 6px;
    font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.3s;
}
.npd-close-btn:hover { background: #1f9a0b !important; transform: translateY(-2px); }

/* ---- Success / Error ---- */
.npd-success-message, .npd-error-message {
    text-align: center; padding: 24px 18px; border-radius: 10px; margin-top: 14px;
}
.npd-success-message { background: #d4edda; border: 2px solid #28a745; }
.npd-error-message   { background: #f8d7da; border: 2px solid #dc3545; }
.npd-success-icon, .npd-error-icon { font-size: 38px; margin-bottom: 10px; font-weight: bold; }
.npd-success-icon { color: #28a745; }
.npd-error-icon   { color: #dc3545; }
.npd-success-message h3, .npd-error-message h3 { margin: 0 0 6px; font-size: 20px; }
.npd-success-message p, .npd-error-message p   { margin: 0; font-size: 14px; line-height: 1.5; }
.npd-no-campaigns { text-align: center; color: #999; padding: 14px; font-size: 13px; }

/* ============================================================
   PAYMENT METHOD OVERLAY
   ============================================================ */
.npd-payment-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 1000000;
    display: flex; align-items: center; justify-content: center;
    padding: 12px;
    box-sizing: border-box;
}
.npd-payment-container {
    position: relative;
    background: #111;
    border-radius: 14px;
    padding: 36px 28px 28px;
    width: 100%; max-width: 440px;
    max-height: 92vh; overflow-y: auto;
    animation: slideUp 0.3s ease-out;
    color: #fff;
    box-sizing: border-box;
}
.npd-payment-title {
    font-size: 19px; font-weight: 800; color: #fff;
    text-align: center; line-height: 1.35; margin: 0 0 10px;
}
.npd-payment-title-highlight { color: #29B80E; }
.npd-payment-subtitle {
    font-size: 13px; color: #bbb; text-align: center;
    line-height: 1.55; margin: 0 0 22px;
}

/* Payment method buttons */
.npd-pay-bank-btn, .npd-pay-paystack-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 14px 16px;
    font-size: 14px; font-weight: 800;
    border: none; border-radius: 8px;
    cursor: pointer; transition: all 0.25s;
    margin-bottom: 12px; letter-spacing: 0.4px;
    box-sizing: border-box;
}
.npd-pay-bank-btn {
    background: #29B80E;
    color: #fff;
}
.npd-pay-bank-btn:hover { background: #1f9a0b; transform: translateY(-2px); }
.npd-pay-paystack-btn {
    background: #FFD700;
    color: #fff;
}
.npd-pay-paystack-btn:hover { background: #f0c800; transform: translateY(-2px); }

.npd-secure-note { text-align: center; font-size: 11px; color: #666; margin: 2px 0 0; }

/* ---- Bank details screen ---- */
.npd-back-btn {
    background: transparent; border: 1px solid #444;
    color: #ccc; padding: 6px 13px; border-radius: 6px;
    cursor: pointer; font-size: 12px; margin-bottom: 16px;
    transition: all 0.2s;
}
.npd-back-btn:hover { border-color: #29B80E; color: #29B80E; }

.npd-bank-heading {
    color: #fff; font-size: 15px; font-weight: 700;
    margin: 0 0 14px; text-align: center;
}
.npd-bank-card {
    background: #fff; border-radius: 10px; padding: 16px 18px;
    margin-bottom: 16px; color: #222;
}
.npd-bank-row { margin-bottom: 12px; }
.npd-bank-row:last-child { margin-bottom: 0; }
.npd-bank-label {
    display: block; font-size: 10px; font-weight: 600; color: #999;
    letter-spacing: 0.8px; text-transform: uppercase; margin-bottom: 3px;
}
.npd-bank-value { font-size: 14px; font-weight: 600; color: #1a1a1a; }
.npd-bold { font-weight: 800; }

.npd-acct-wrapper { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.npd-acct-number { font-size: 19px; font-weight: 800; color: #B8860B; letter-spacing: 1px; }
.npd-copy-btn {
    background: #f5f5f5; border: 1px solid #ddd; border-radius: 5px;
    padding: 4px 10px; font-size: 11px; font-weight: 700;
    color: #555; cursor: pointer; transition: all 0.2s;
}
.npd-copy-btn:hover { background: #e0e0e0; }

.npd-step2-box {
    background: #1a1a1a; border: 1px solid #333;
    border-radius: 10px; padding: 14px 16px; color: #ddd;
}
.npd-step2-box p { margin: 8px 0 12px; font-size: 13px; line-height: 1.55; color: #bbb; }
.npd-step2-badge {
    display: inline-block; background: #29B80E; color: #fff;
    font-size: 10px; font-weight: 800; padding: 3px 9px;
    border-radius: 4px; letter-spacing: 0.5px;
}
.npd-wa-link {
    display: inline-block; padding: 9px 16px;
    background: transparent; border: 2px solid #29B80E;
    border-radius: 8px; color: #29B80E;
    font-size: 13px; font-weight: 700; text-decoration: none;
    transition: all 0.2s; word-break: break-all;
}
.npd-wa-link:hover { background: #29B80E; color: #fff; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeIn  { from { opacity: 0; }                          to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }

/* ============================================================
   RESPONSIVE — TABLET  (max 768px)
   ============================================================ */
@media (max-width: 768px) {
    .npd-donation-form  { padding: 26px 20px; }
    .npd-form-title     { font-size: 20px; }
    .npd-submit-btn     { font-size: 15px; padding: 13px 18px; }
    .npd-payment-container { padding: 28px 20px 22px; }
    .npd-payment-title  { font-size: 17px; }
    .npd-pay-bank-btn,
    .npd-pay-paystack-btn { font-size: 13px; padding: 13px 14px; }
}

/* ============================================================
   RESPONSIVE — MOBILE  (max 480px)
   ============================================================ */
@media (max-width: 480px) {
    /* Modal / overlay padding */
    .npd-modal-overlay,
    .npd-payment-overlay { padding: 8px; }

    /* Donation form */
    .npd-modal-container  { max-height: 96vh; border-radius: 10px; }
    .npd-donation-form    { padding: 20px 14px; border-radius: 10px; }
    .npd-form-title       { font-size: 17px; }
    .npd-form-subtitle    { font-size: 12px; margin-bottom: 18px; }
    .npd-label            { font-size: 12px; }
    .npd-campaign-name    { font-size: 12px; }
    .npd-campaigns-list   { padding: 8px 10px; max-height: 170px; }

    /* Currency toggle */
    .npd-currency-btn     { font-size: 12px; padding: 8px 6px; }

    /* Amount input */
    .npd-currency         { font-size: 15px; height: 44px; padding: 0 10px; }
    .npd-amount-input     { font-size: 15px; padding: 10px 12px; }
    .npd-text-input       { font-size: 13px; padding: 10px 12px; }

    /* Donate Now button — smaller on mobile */
    .npd-submit-btn       { font-size: 14px; padding: 12px 16px; border-radius: 26px; }


    /* Payment overlay */
    .npd-payment-container { padding: 24px 14px 18px; border-radius: 12px; max-height: 96vh; }
    .npd-payment-title     { font-size: 15px; line-height: 1.4; }
    .npd-payment-subtitle  { font-size: 12px; margin-bottom: 18px; }

    /* Payment buttons — key mobile fix */
    .npd-pay-bank-btn,
    .npd-pay-paystack-btn  {
        font-size: 13px;
        padding: 12px 12px;
        border-radius: 7px;
        margin-bottom: 10px;
        gap: 6px;
    }

    /* Bank card */
    .npd-bank-card      { padding: 14px 14px; }
    .npd-bank-value     { font-size: 13px; }
    .npd-acct-number    { font-size: 17px; }
    .npd-bank-heading   { font-size: 14px; }

    /* Step 2 box */
    .npd-step2-box      { padding: 12px 13px; }
    .npd-step2-box p    { font-size: 12px; }
    .npd-wa-link        { font-size: 12px; padding: 8px 12px; }

    /* Modal close button */
    .npd-modal-close    { font-size: 22px; width: 30px; height: 30px; top: 8px; right: 8px; }

    /* Success/error */
    .npd-success-message, .npd-error-message { padding: 18px 14px; }
    .npd-success-icon, .npd-error-icon       { font-size: 30px; }
    .npd-success-message h3, .npd-error-message h3 { font-size: 17px; }
    .npd-success-message p, .npd-error-message p   { font-size: 13px; }
}

/* ============================================================
   RESPONSIVE — VERY SMALL (max 360px)
   ============================================================ */
@media (max-width: 360px) {
    .npd-form-title    { font-size: 15px; }
    .npd-submit-btn    { font-size: 13px; padding: 11px 14px; }
    .npd-payment-title { font-size: 14px; }
    .npd-pay-bank-btn,
    .npd-pay-paystack-btn { font-size: 12px; padding: 11px 10px; }
    .npd-acct-number   { font-size: 15px; }
}
