/* Foundation Donation Plugin — Public Form Styles */
/* Uses .fd- prefix to avoid conflicts with theme styles */

.fd-form-wrapper {
    max-width: 560px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* ── Card ──────────────────────────────────────────────────────────────────── */
.fd-form-card {
    background: #ffffff;
    border-radius: 12px;
    border-top: 4px solid #1d4ed8;
    box-shadow: 0 4px 24px rgba(0,0,0,.10);
    overflow: hidden;
}
.fd-form-card-header {
    background: #f8fafc;
    padding: 32px 28px 24px;
    text-align: center;
    border-bottom: 1px solid #f1f5f9;
}
.fd-heart-icon {
    width: 48px; height: 48px;
    background: #eff6ff;
    color: #1d4ed8;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 12px;
}
.fd-form-title {
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 6px;
}
.fd-form-desc {
    color: #64748b;
    font-size: 14px;
    margin: 0;
}
.fd-form-card-body {
    padding: 24px 28px 32px;
}

/* ── Error Banner ──────────────────────────────────────────────────────────── */
.fd-error-banner {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
}

/* ── Section ──────────────────────────────────────────────────────────────── */
.fd-section { margin-bottom: 4px; }
.fd-section-label {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 12px;
}
.fd-separator {
    border: 0;
    border-top: 1px solid #f1f5f9;
    margin: 20px 0;
}

/* ── Preset Amounts ──────────────────────────────────────────────────────── */
.fd-preset-amounts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}
.fd-amount-btn {
    padding: 10px 6px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    color: #334155;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
}
.fd-amount-btn:hover { border-color: #1d4ed8; color: #1d4ed8; background: #eff6ff; }
.fd-amount-btn.active { border-color: #1d4ed8; background: #1d4ed8; color: #ffffff; }

.fd-custom-amount {
    position: relative;
    margin-top: 8px;
}
.fd-currency {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-weight: 600;
}

/* ── Inputs ───────────────────────────────────────────────────────────────── */
.fd-form-group { margin-bottom: 14px; }
.fd-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 5px;
}
.fd-required { color: #ef4444; }
.fd-input, .fd-select, .fd-textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    color: #1e293b;
    background: #ffffff;
    box-sizing: border-box;
    transition: border-color .15s, box-shadow .15s;
    outline: none;
}
.fd-input:focus, .fd-select:focus, .fd-textarea:focus {
    border-color: #1d4ed8;
    box-shadow: 0 0 0 3px rgba(29,78,216,.12);
}
.fd-input.fd-amount-custom { padding-left: 28px; }
.fd-textarea { resize: vertical; min-height: 80px; }
.fd-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fd-field-error { color: #dc2626; font-size: 12px; margin-top: 4px; }
.fd-input.error, .fd-select.error, .fd-textarea.error { border-color: #dc2626; }

/* ── Payment Methods ──────────────────────────────────────────────────────── */
.fd-payment-methods {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
}
.fd-payment-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all .15s;
    background: #fff;
}
.fd-payment-option:hover { border-color: #1d4ed8; background: #eff6ff; }
.fd-payment-option input[type="radio"] { position: absolute; opacity: 0; width: 0; }
.fd-payment-option.active { border-color: #1d4ed8; background: #eff6ff; }
.fd-payment-icon { font-size: 24px; margin-bottom: 6px; }
.fd-payment-label { font-size: 13px; font-weight: 600; color: #334155; }

.fd-payment-panel {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px;
    margin-top: 0;
}
.fd-gcash-info { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 10px; }
.fd-qr-wrap { background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 6px; flex-shrink: 0; }
.fd-qr-img { width: 110px; height: 110px; object-fit: cover; display: block; border-radius: 4px; }
.fd-gcash-details { flex: 1; }
.fd-gcash-label { font-weight: 600; font-size: 14px; color: #1e293b; margin: 0 0 4px; }
.fd-gcash-number { font-family: monospace; font-size: 18px; font-weight: 700; color: #1d4ed8; margin: 0 0 4px; }
.fd-gcash-acct { font-size: 13px; color: #64748b; margin: 0; }

.fd-bank-accounts { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.fd-bank-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.fd-bank-info { display: flex; flex-direction: column; gap: 2px; }
.fd-bank-name { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #64748b; }
.fd-bank-number { font-family: monospace; font-size: 15px; font-weight: 600; color: #1e293b; }
.fd-bank-acct-name { font-size: 12px; color: #64748b; }
.fd-copy-btn {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 12px;
    cursor: pointer;
    color: #374151;
    transition: background .15s;
}
.fd-copy-btn:hover { background: #e2e8f0; }
.fd-payment-note { font-size: 12px; color: #64748b; margin: 0; }

/* ── Consent ──────────────────────────────────────────────────────────────── */
.fd-consent-section {
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 20px;
}
.fd-checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    cursor: pointer;
}
.fd-checkbox-row:last-child { margin-bottom: 0; }
.fd-checkbox { margin-top: 2px; width: 16px; height: 16px; flex-shrink: 0; cursor: pointer; accent-color: #1d4ed8; }
.fd-checkbox-text { font-size: 13px; color: #374151; line-height: 1.5; }
.fd-checkbox-text a { color: #1d4ed8; }
.fd-text-muted { color: #64748b; }
.fd-optional-row { padding-top: 8px; border-top: 1px solid #e2e8f0; margin-top: 4px; }

/* ── Submit Button ────────────────────────────────────────────────────────── */
.fd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all .2s;
    text-decoration: none;
}
.fd-btn-submit {
    width: 100%;
    background: #1d4ed8;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(29,78,216,.3);
}
.fd-btn-submit:hover { background: #1e40af; box-shadow: 0 6px 16px rgba(29,78,216,.4); }
.fd-btn-submit:disabled { opacity: .6; cursor: not-allowed; }
.fd-btn-outline {
    background: transparent;
    color: #1d4ed8;
    border: 2px solid #1d4ed8;
    width: 100%;
    margin-top: 10px;
}
.fd-btn-outline:hover { background: #eff6ff; }

/* ── Success State ────────────────────────────────────────────────────────── */
.fd-success-state {
    text-align: center;
    padding: 48px 32px;
    background: #fff;
    border-radius: 12px;
    border-top: 4px solid #16a34a;
    box-shadow: 0 4px 24px rgba(0,0,0,.10);
}
.fd-success-icon {
    width: 72px; height: 72px;
    background: #dcfce7;
    color: #16a34a;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
}
.fd-success-state h2 { font-size: 24px; font-weight: 700; color: #0f172a; margin: 0 0 10px; }
.fd-success-state p { color: #475569; font-size: 14px; max-width: 320px; margin: 0 auto 20px; line-height: 1.6; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .fd-form-card-header, .fd-form-card-body { padding-left: 16px; padding-right: 16px; }
    .fd-preset-amounts { grid-template-columns: repeat(2, 1fr); }
    .fd-grid-2 { grid-template-columns: 1fr; }
    .fd-payment-methods { grid-template-columns: 1fr 1fr; }
}
