/* =========================================================
   Hope Welfare Donation – Front-end form styles
   ========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

.rhd-donation-form {
    font-family: 'Outfit', sans-serif;
    background: #fff;
    box-shadow: 0 5px 30px rgba(0,0,0,0.1);
    border-radius: 16px;
    max-width: 520px;
    width: 100%;
    padding: 35px 30px;
    margin: 0 auto;
    box-sizing: border-box;
    border-top: 4px solid #00A54F;
}

/* ── Step Indicator ─────────────────────────────────────── */
.rhd-step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 28px;
    gap: 0;
}
.rhd-step {
    background: #F0F0F0;
    color: #CBCBCB;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
    transition: background 0.3s, color 0.3s;
    flex-shrink: 0;
}
.rhd-step.rhd-active {
    background: #1E293B;
    color: #fff;
}
.rhd-step.rhd-done {
    background: #00A54F;
    color: #fff;
}
.rhd-step-line {
    flex: 1;
    height: 2px;
    background: #E9E9E9;
    margin: 0 6px;
    max-width: 60px;
}

/* ── Heading ─────────────────────────────────────────────── */
.rhd-donation-form h2 {
    font-size: 20px;
    font-weight: 600;
    color: #1E293B;
    text-align: center;
    margin-bottom: 24px;
    text-transform: capitalize;
}

/* ── Inner scroll area ───────────────────────────────────── */
.rhd-inner {
    max-height: 380px;
    overflow-y: auto;
    padding-right: 4px;
    margin-bottom: 20px;
    scrollbar-width: thin;
    scrollbar-color: #00A54F #f0f0f0;
}
.rhd-inner::-webkit-scrollbar { width: 3px; }
.rhd-inner::-webkit-scrollbar-track { background: #f0f0f0; border-radius: 3px; }
.rhd-inner::-webkit-scrollbar-thumb { background: #00A54F; border-radius: 3px; }

/* ── Inputs ──────────────────────────────────────────────── */
.rhd-select,
.rhd-input {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #E9E9E9;
    border-radius: 8px;
    font-size: 15px;
    font-family: 'Outfit', sans-serif;
    background: #fff;
    color: #1E293B;
    margin-bottom: 14px;
    box-sizing: border-box;
    transition: border 0.25s, box-shadow 0.25s;
}
.rhd-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2300A54F'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
}
.rhd-textarea {
    resize: vertical;
    min-height: 80px;
}
.rhd-input:focus,
.rhd-select:focus {
    border-color: #00A54F;
    box-shadow: 0 0 0 3px rgba(0,165,79,0.15);
    outline: none;
}
.rhd-input.rhd-error {
    border-color: #e53935;
}

/* ── Toggle groups (Frequency / Fund) ───────────────────── */
.rhd-toggle-group {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}
.rhd-toggle-group input[type="radio"] { display: none; }
.rhd-toggle-group label {
    flex: 1;
    background: #fff;
    border: 1px solid #E9E9E9;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    color: #CBCBCB;
    transition: 0.25s;
}
.rhd-toggle-group input:checked + label {
    background: #00A54F;
    border-color: #00A54F;
    color: #fff;
}

/* ── Amount grid ─────────────────────────────────────────── */
.rhd-amount-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}
.rhd-amount-grid input[type="radio"] { display: none; }
.rhd-amount-grid label {
    padding: 12px 8px;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 400;
    color: #1E293B;
    background: #fff;
    border: 1px solid #E9E9E9;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    transition: 0.25s;
}
.rhd-amount-grid label:hover {
    border-color: #00A54F;
}
.rhd-amount-grid input[type="radio"]:checked + label {
    border-color: #00A54F;
    color: #004D25;
    font-weight: 600;
    background: #e8f7ef;
}
.rhd-amount-grid label.rhd-error {
    border-color: #e53935;
    color: #e53935;
}

/* ── Custom amount ───────────────────────────────────────── */
#rhd-custom-amount-wrap {
    margin-bottom: 14px;
}
#rhd-custom-amount {
    margin-bottom: 0;
}

/* ── Bank box ────────────────────────────────────────────── */
.rhd-bank-box {
    background: #f0fbf5;
    border: 1px solid #b3e6cc;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 2;
    color: #1E293B;
}
.rhd-bank-box strong { color: #004D25; }

/* ── Summary ─────────────────────────────────────────────── */
.rhd-summary-box {
    background: #e8f7ef !important;
    border: 1px solid #b3e6cc !important;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 16px;
    font-size: 13px;
    line-height: 1.8;
    color: #1E293B;
}
.rhd-summary-box strong { color: #004D25; }

/* ── Upload ──────────────────────────────────────────────── */
.rhd-upload-section { margin-bottom: 16px; }
.rhd-upload-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #1E293B;
}
.rhd-upload-section input[type="file"] {
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    cursor: pointer;
    width: 100%;
}
.rhd-upload-section input[type="file"]::file-selector-button {
    background: #00A54F;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    margin-right: 10px;
}
.rhd-upload-section input[type="file"]::file-selector-button:hover { opacity: 0.85; }
.rhd-note {
    font-size: 12px;
    color: #999;
    margin-top: 6px;
}

/* ── GDPR ────────────────────────────────────────────────── */
.rhd-gdpr-wrap { margin-bottom: 10px; }
.rhd-gdpr-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 12px;
    color: #555;
    cursor: pointer;
    line-height: 1.5;
}
.rhd-gdpr-label input[type="checkbox"] { margin-top: 2px; flex-shrink: 0; accent-color: #00A54F; }

/* ── Buttons ─────────────────────────────────────────────── */
.rhd-btn-wrap { display: flex; justify-content: center; }
.rhd-btn-group { display: flex; gap: 10px; }
.rhd-btn-group .rhd-btn { flex: 1; }

.rhd-donation-form .rhd-btn,
.rhd-donation-form button.rhd-btn {
    padding: 11px 20px;
    background: #00A54F !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    transition: background 0.25s;
    box-shadow: 0 2px 8px rgba(0,165,79,0.2);
    width: 60%;
    text-shadow: none !important;
}
.rhd-donation-form .rhd-btn:hover,
.rhd-donation-form button.rhd-btn:hover { background: #007A3A !important; color: #fff !important; }
.rhd-donation-form .rhd-btn:active,
.rhd-donation-form button.rhd-btn:active { background: #004D25 !important; color: #fff !important; }

.rhd-donation-form .rhd-btn-back,
.rhd-donation-form button.rhd-btn-back {
    background: #fff !important;
    border: 1.5px solid #E9E9E9 !important;
    color: #999 !important;
    width: auto;
    padding: 11px 18px;
    flex: 0;
    box-shadow: none !important;
}
.rhd-donation-form .rhd-btn-back:hover,
.rhd-donation-form button.rhd-btn-back:hover {
    background: #f5f5f5 !important;
    color: #555 !important;
    border-color: #ccc !important;
}

/* ── Hidden ──────────────────────────────────────────────── */
.rhd-hidden { display: none; }

/* ── Error message ───────────────────────────────────────── */
.rhd-donation-form .rhd-form-error {
    background: #fff0f0;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 14px;
    display: none;
}
.rhd-donation-form .rhd-form-error.show { display: block; }

/* ── Spinner ─────────────────────────────────────────────── */
.rhd-spinner {
    display: none;
    width: 20px; height: 20px;
    border: 3px solid rgba(0,165,79,0.2);
    border-top-color: #00A54F;
    border-radius: 50%;
    animation: rhd-spin 0.7s linear infinite;
    margin: 0 auto 12px;
}
@keyframes rhd-spin { to { transform: rotate(360deg); } }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 480px) {
    .rhd-donation-form { padding: 24px 18px; }
    .rhd-donation-form h2 { font-size: 17px; }
    .rhd-amount-grid { grid-template-columns: repeat(2, 1fr); }
    .rhd-inner { max-height: 420px; }
}
