/**
 * built-africa-popup.css  v2.3.0
 *
 * Front-end styles for the Built Africa Popup.
 * Designed by ProspenTech — www.prospentech.co.za
 */

/* ── Trigger button (shortcode / manual) ────────────────────────────────── */
.ba-popup-trigger,
#ba-popup-trigger {
    cursor: pointer;
}
button.ba-popup-trigger {
    display: inline-block;
    padding: 13px 24px;
    background: #BE1E2E;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    font-family: Arial, sans-serif;
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease;
    letter-spacing: 0.02em;
}
button.ba-popup-trigger:hover,
button.ba-popup-trigger:focus {
    background: #9e1826;
    box-shadow: 0 4px 14px rgba(190,30,46,0.35);
    outline: none;
}

/* ── Overlay ─────────────────────────────────────────────────────────────── */
#ba-popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
#ba-popup-overlay.ba-active {
    display: flex;
    animation: ba-fade-in 0.22s ease forwards;
}
@keyframes ba-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ── Card ────────────────────────────────────────────────────────────────── */
#ba-popup-card {
    background: #F5F5F5;
    border-radius: 14px;
    padding: 40px 32px 32px;
    max-width: 460px;
    width: 100%;
    position: relative;
    font-family: Arial, sans-serif;
    text-align: center;
    box-shadow: 0 10px 44px rgba(0,0,0,0.22);
    max-height: 90vh;
    overflow-y: auto;
    animation: ba-slide-up 0.28s ease forwards;
}
@keyframes ba-slide-up {
    from { transform: translateY(22px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

/* ── Close button ────────────────────────────────────────────────────────── */
#ba-popup-close {
    position: absolute;
    top: 13px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: #aaa;
    padding: 0;
    transition: color 0.15s;
}
#ba-popup-close:hover,
#ba-popup-close:focus { color: #BE1E2E; outline: none; }

/* ── Logo ────────────────────────────────────────────────────────────────── */
#ba-popup-logo-wrap { margin-bottom: 12px; }
#ba-popup-logo-wrap svg { display: block; margin: 0 auto; }

/* ── Heading / description ───────────────────────────────────────────────── */
#ba-popup-heading {
    font-size: 22px;
    font-weight: 700;
    color: #BE1E2E;
    margin: 0 0 8px;
    line-height: 1.25;
}
#ba-popup-description {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    margin: 0 0 20px;
}

/* ── Notice (error / info) ───────────────────────────────────────────────── */
#ba-popup-notice {
    display: none;
    padding: 10px 14px;
    border-radius: 5px;
    font-size: 13px;
    margin-bottom: 14px;
    border-left: 4px solid;
    text-align: left;
}
#ba-popup-notice.ba-notice-error   { background: #fff5f5; border-color: #dc3232; color: #8b0000; display: block; }
#ba-popup-notice.ba-notice-info    { background: #f0f7ff; border-color: #0073aa; color: #004a75; display: block; }

/* ── Form fields ─────────────────────────────────────────────────────────── */
#ba-popup-form {
    text-align: left;
}
.ba-hp-field {
    display: none !important;
    visibility: hidden;
}
.ba-field-group {
    margin-bottom: 12px;
}
.ba-field-group label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #444;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.ba-req { color: #BE1E2E; }
.ba-opt { color: #aaa; font-weight: 400; text-transform: none; letter-spacing: 0; font-size: 11px; }

#ba-popup-card .ba-field-group input[type="text"],
#ba-popup-card .ba-field-group input[type="email"],
#ba-popup-card .ba-field-group input[type="tel"],
#ba-popup-card .ba-field-group textarea {
    width: 100% !important;
    padding: 10px 12px !important;
    border: 1px solid #ddd !important;
    border-radius: 5px !important;
    font-size: 13px !important;
    font-family: Arial, sans-serif !important;
    color: #333 !important;
    background: #fff !important;
    box-sizing: border-box !important;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    height: auto !important;
    line-height: normal !important;
    margin: 0 !important;
    box-shadow: none !important;
}
#ba-popup-card .ba-field-group input:focus,
#ba-popup-card .ba-field-group textarea:focus {
    border-color: #BE1E2E !important;
    box-shadow: 0 0 0 2px rgba(190,30,46,0.12) !important;
}
#ba-popup-card .ba-field-group input.ba-error,
#ba-popup-card .ba-field-group textarea.ba-error {
    border-color: #dc3232 !important;
    background: #fff8f8 !important;
}
#ba-popup-card .ba-field-group textarea {
    resize: vertical;
    min-height: 60px !important;
    height: auto !important;
}
.ba-field-error {
    display: block;
    font-size: 11px;
    color: #dc3232;
    margin-top: 3px;
    min-height: 14px;
}

/* ── Two-column field row ─────────────────────────────────────────────────── */
.ba-field-row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
@media (max-width: 480px) {
    .ba-field-row-2col {
        grid-template-columns: 1fr;
    }
}

/* ── Radio group ─────────────────────────────────────────────────────────── */
.ba-radio-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.ba-radio-label {
    display: flex !important;
    align-items: center;
    gap: 6px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13px !important;
    font-weight: 400 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    color: #333 !important;
    transition: border-color 0.15s, background 0.15s;
    flex: 1;
    min-width: 80px;
    justify-content: center;
}
.ba-radio-label:hover { border-color: #BE1E2E; background: #fff5f5; }
.ba-radio-label input[type="radio"] { accent-color: #BE1E2E; margin: 0; }
.ba-radio-label:has(input:checked) {
    border-color: #BE1E2E;
    background: #fff0f1;
    font-weight: 600 !important;
}

/* ── Submit button ───────────────────────────────────────────────────────── */
#ba-popup-submit {
    width: 100%;
    padding: 13px;
    background: #BE1E2E;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 700;
    font-family: Arial, sans-serif;
    cursor: pointer;
    margin-top: 6px;
    transition: background 0.2s, box-shadow 0.2s;
    letter-spacing: 0.02em;
}
#ba-popup-submit:hover:not(:disabled) {
    background: #9e1826;
    box-shadow: 0 4px 14px rgba(190,30,46,0.35);
}
#ba-popup-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
#ba-popup-submit.ba-loading::after {
    content: ' …';
}

/* ── Success state ───────────────────────────────────────────────────────── */
#ba-popup-success {
    text-align: center;
    padding: 10px 0 4px;
}
#ba-popup-success-icon {
    width: 54px;
    height: 54px;
    background: #BE1E2E;
    color: #fff;
    border-radius: 50%;
    font-size: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}
#ba-popup-success-msg {
    font-size: 15px;
    color: #333;
    font-weight: 600;
    margin: 0 0 20px;
}
#ba-popup-cta-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}
#ba-popup-donate-btn,
#ba-popup-volunteer-btn {
    flex: 1;
    min-width: 120px;
    text-align: center;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: opacity 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}
#ba-popup-donate-btn {
    background: #BE1E2E;
    color: #fff;
    border: 2px solid #BE1E2E;
}
#ba-popup-donate-btn:hover   { opacity: 0.88; box-shadow: 0 4px 12px rgba(190,30,46,0.3); }
#ba-popup-volunteer-btn {
    background: #fff;
    color: #BE1E2E;
    border: 2px solid #BE1E2E;
}
#ba-popup-volunteer-btn:hover { background: #fdf0f1; }

/* ── Credit ──────────────────────────────────────────────────────────────── */
#ba-popup-credit {
    margin: 18px 0 0;
    font-size: 11px;
    color: #bbb;
    text-align: center;
}
#ba-popup-credit a { color: #bbb; text-decoration: none; }
#ba-popup-credit a:hover { text-decoration: underline; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    #ba-popup-card      { padding: 32px 18px 24px; }
    #ba-popup-heading   { font-size: 19px; }
    .ba-radio-group     { flex-direction: column; }
    .ba-radio-label     { flex: none; width: 100%; }
    #ba-popup-cta-buttons { flex-direction: column; }
    #ba-popup-donate-btn,
    #ba-popup-volunteer-btn { flex: none; width: 100%; }
}
