/* ─── Trigger button ──────────────────────────────────────────────────────── */
.mfv-don-trigger-wrap { margin: 20px 0; }
.mfv-don-trigger-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--mfv-secondary-alt, #7B35D8) 0%, var(--mfv-accent, #f97316) 100%);
    color: #fff; border: none; border-radius: 14px;
    font-size: 1rem; font-weight: 700; cursor: pointer; font-family: inherit;
    transition: transform 160ms ease, box-shadow 160ms ease;
    box-shadow: 0 4px 18px rgba(123,53,216,0.35);
}
.mfv-don-trigger-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(123,53,216,0.45);
}

/* ─── Backdrop ────────────────────────────────────────────────────────────── */
.mfv-don-panel-backdrop {
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 99998;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: mfv-fade-in 200ms ease forwards;
}
@keyframes mfv-fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ─── Modal (centered card) ───────────────────────────────────────────────── */
.mfv-don-panel {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 99999;
    width: calc(100% - 32px);
    max-width: 460px;
    max-height: 92vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #ffffff;
    border-radius: 24px;
    box-shadow:
        0 0 0 1px rgba(0,0,0,0.05),
        0 20px 60px rgba(15,23,42,0.28),
        0  8px 20px rgba(15,23,42,0.12);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    animation: mfv-popup-in 280ms cubic-bezier(0.34,1.56,0.64,1) forwards;
}
@keyframes mfv-popup-in {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.88); }
    to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* ─── Close button ────────────────────────────────────────────────────────── */
.mfv-don-panel-close {
    position: absolute; top: 14px; right: 14px;
    width: 32px; height: 32px;
    background: var(--mfv-slate-100, #f1f5f9); border: none; border-radius: 50%;
    font-size: 0.9rem; cursor: pointer; color: var(--mfv-slate-500, #64748b);
    display: flex; align-items: center; justify-content: center;
    transition: background 150ms ease, color 150ms ease; z-index: 1;
}
.mfv-don-panel-close:hover { background: var(--mfv-slate-200, #e2e8f0); color: var(--mfv-slate-800, #1e293b); }

/* ─── Header ──────────────────────────────────────────────────────────────── */
.mfv-don-panel-header {
    display: flex; gap: 14px; align-items: flex-start;
    padding: 24px 24px 0;
}
.mfv-don-panel-avatar {
    width: 56px; height: 56px; border-radius: 14px;
    object-fit: cover; flex-shrink: 0; border: 2px solid var(--mfv-slate-100, #f1f5f9);
}
.mfv-don-panel-title {
    font-size: 1.1rem; font-weight: 700; color: #0f172a;
    margin-bottom: 4px; line-height: 1.3;
}
.mfv-don-panel-desc { font-size: 0.83rem; color: var(--mfv-slate-500, #64748b); line-height: 1.5; margin: 0; }

/* ─── Body ────────────────────────────────────────────────────────────────── */
.mfv-don-panel-body { padding: 20px 24px 28px; }

/* ─── Amount pills ────────────────────────────────────────────────────────── */
.mfv-don-amount-pills {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px; margin-bottom: 14px;
}
.mfv-don-pill {
    padding: 14px 8px;
    background: var(--mfv-slate-50, #f8fafc); border: 2px solid var(--mfv-slate-200, #e2e8f0); border-radius: 14px;
    font-size: 1.05rem; font-weight: 700; cursor: pointer; font-family: inherit;
    color: #334155; transition: all 140ms ease; text-align: center; line-height: 1;
}
.mfv-don-pill:hover {
    border-color: var(--mfv-secondary-alt, #7B35D8); background: #f5f3ff;
    color: var(--mfv-secondary-alt, #7B35D8); transform: translateY(-1px);
}
.mfv-don-pill.is-active {
    background: linear-gradient(135deg, var(--mfv-secondary-alt, #7B35D8), #6d28d9);
    border-color: transparent; color: #fff;
    box-shadow: 0 4px 14px rgba(123,53,216,0.35);
    transform: translateY(-1px);
}
/* Custom pill — spans all columns */
.mfv-don-pill--custom {
    grid-column: 1 / -1;
    font-size: 0.88rem; padding: 11px 8px;
    background: #fff7ed; border-color: #fed7aa; color: #c2410c;
}
.mfv-don-pill--custom:hover,
.mfv-don-pill--custom.is-active {
    background: linear-gradient(135deg, var(--mfv-accent, #f97316), #ea580c);
    border-color: transparent; color: #fff;
    box-shadow: 0 4px 14px rgba(249,115,22,0.35);
}

/* ─── Custom input ────────────────────────────────────────────────────────── */
.mfv-don-custom-wrap { margin-bottom: 14px; }
.mfv-don-custom-label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--mfv-slate-600, #475569); margin-bottom: 6px; }
.mfv-don-custom-input {
    width: 100%; padding: 12px 14px 12px 28px;
    font-size: 1.2rem; font-weight: 700;
    border: 2px solid var(--mfv-slate-200, #e2e8f0); border-radius: 12px;
    font-family: inherit; color: #0f172a;
    transition: border-color 200ms ease, box-shadow 200ms ease;
    box-sizing: border-box; background: var(--mfv-slate-50, #f8fafc);
}
.mfv-don-custom-input:focus {
    outline: none; border-color: var(--mfv-secondary-alt, #7B35D8);
    box-shadow: 0 0 0 3px rgba(123,53,216,0.12); background: #fff;
}

/* ─── Frequency toggle ────────────────────────────────────────────────────── */
.mfv-don-frequency {
    display: flex; gap: 4px; margin-bottom: 16px;
    background: var(--mfv-slate-100, #f1f5f9); border-radius: 12px; padding: 4px;
}
.mfv-don-freq-btn {
    flex: 1; padding: 9px 6px;
    background: transparent; border: none; border-radius: 9px;
    font-family: inherit; font-size: 0.875rem; font-weight: 600;
    cursor: pointer; color: var(--mfv-slate-500, #64748b); transition: all 140ms ease;
}
.mfv-don-freq-btn.is-active {
    background: #fff; color: var(--mfv-accent, #f97316);
    box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}

/* ─── Fields ──────────────────────────────────────────────────────────────── */
.mfv-don-field { margin-bottom: 12px; }
.mfv-don-label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--mfv-slate-600, #475569); margin-bottom: 6px; }
.mfv-don-textarea {
    width: 100%; padding: 10px 14px; font-size: 0.875rem; line-height: 1.5;
    border: 2px solid var(--mfv-slate-200, #e2e8f0); border-radius: 12px; font-family: inherit; resize: none;
    transition: border-color 200ms ease, box-shadow 200ms ease;
    box-sizing: border-box; background: var(--mfv-slate-50, #f8fafc); color: var(--mfv-slate-800, #1e293b);
}
.mfv-don-textarea:focus {
    outline: none; border-color: var(--mfv-secondary-alt, #7B35D8);
    box-shadow: 0 0 0 3px rgba(123,53,216,0.12); background: #fff;
}

/* ─── Submit ──────────────────────────────────────────────────────────────── */
.mfv-don-submit {
    width: 100%; padding: 16px;
    background: linear-gradient(135deg, var(--mfv-accent, #f97316) 0%, #ea580c 100%);
    color: #fff; border: none; border-radius: 14px;
    font-size: 1.05rem; font-weight: 700; cursor: pointer; font-family: inherit;
    transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
    box-shadow: 0 4px 16px rgba(249,115,22,0.4);
    margin-top: 8px; letter-spacing: 0.01em;
}
.mfv-don-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(249,115,22,0.5);
}
.mfv-don-submit:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }

/* ─── Impact note ─────────────────────────────────────────────────────────── */
.mfv-don-impact {
    text-align: center; font-size: 0.73rem; color: var(--mfv-slate-400, #94a3b8);
    margin-top: 10px; line-height: 1.5;
}

/* ─── Dashboard / settings ────────────────────────────────────────────────── */
.mfv-don-upgrade-cta {
    padding: 40px 32px; text-align: center;
    background: linear-gradient(135deg, #f5f3ff 0%, #fff7ed 100%);
    border-radius: 16px; border: 1px solid #e9d5ff;
}
.mfv-don-upgrade-cta h3 { font-size: 1.2rem; font-weight: 700; color: var(--mfv-slate-800, #1e293b); margin: 0 0 10px; }
.mfv-don-upgrade-cta p  { color: var(--mfv-slate-500, #64748b); font-size: 0.9rem; margin: 0 0 20px; }

.mfv-don-settings-card {
    background: #fff; border: 1px solid var(--mfv-slate-200, #e2e8f0);
    border-radius: 16px; padding: 24px; margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.mfv-don-listing-title {
    font-size: 1.05rem; font-weight: 700; color: #0f172a;
    margin-bottom: 16px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
}
.mfv-don-badge { padding: 3px 10px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; }
.mfv-don-badge--green  { background: #dcfce7; color: #166534; }
.mfv-don-badge--yellow { background: #fef3c7; color: #92400e; }
.mfv-don-badge--red    { background: #fee2e2; color: #991b1b; }
.mfv-don-badge--blue   { background: #dbeafe; color: #1e40af; }

/* P16B: Locked EIN display */
.mfv-ein-locked {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    padding: 10px 14px; background: #f0fdf4; border: 1px solid #bbf7d0;
    border-radius: 10px; margin-top: 4px;
}
.mfv-ein-masked {
    font-family: 'Courier New', monospace; font-size: 1.05rem;
    font-weight: 700; color: #166534; letter-spacing: 1px;
}
.mfv-ein-badge {
    font-size: 0.78rem; font-weight: 600; color: #166534;
    background: #dcfce7; padding: 3px 10px; border-radius: 999px;
}

.mfv-don-input {
    width: 100%; padding: 9px 12px; border: 2px solid var(--mfv-slate-200, #e2e8f0); border-radius: 10px;
    font-size: 0.9rem; font-family: inherit;
    transition: border-color 200ms ease, box-shadow 200ms ease;
    box-sizing: border-box; background: var(--mfv-slate-50, #f8fafc);
}
.mfv-don-input:focus {
    outline: none; border-color: var(--mfv-secondary-alt, #7B35D8);
    box-shadow: 0 0 0 3px rgba(123,53,216,0.12); background: #fff;
}
.mfv-don-field label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--mfv-slate-800, #1e293b); margin-bottom: 5px; }
.mfv-don-field--row { display: flex; gap: 24px; flex-wrap: wrap; }
.mfv-don-hint { font-size: 0.8rem; color: #6b7280; margin-bottom: 6px; }

.mfv-don-btn {
    padding: 11px 24px; border: none; border-radius: 10px;
    font-family: inherit; font-size: 0.9rem; font-weight: 700;
    cursor: pointer; text-decoration: none; display: inline-block; transition: all 150ms ease;
}
.mfv-don-btn--purple { background: var(--mfv-secondary-alt, #7B35D8); color: #fff; box-shadow: 0 2px 8px rgba(123,53,216,0.3); }
.mfv-don-btn--purple:hover { background: #6d28d9; transform: translateY(-1px); }
.mfv-don-btn--orange { background: linear-gradient(135deg, var(--mfv-accent, #f97316), #ea580c); color: #fff; }
.mfv-don-btn--orange:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(249,115,22,0.4); }

.mfv-don-error   { background: #fee2e2; border: 1px solid #fecaca; padding: 12px 16px; border-radius: 10px; color: #991b1b; margin-bottom: 16px; font-size: 0.875rem; }
.mfv-don-success { background: #dcfce7; border: 1px solid #bbf7d0; padding: 12px 16px; border-radius: 10px; color: #166534; margin-bottom: 16px; font-size: 0.875rem; }
.mfv-don-giving-wrap { max-width: 700px; }

/* ─── Mobile ──────────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .mfv-don-panel { width: calc(100% - 16px); max-height: 95vh; border-radius: 20px; }
    .mfv-don-panel-header, .mfv-don-panel-body { padding-left: 18px; padding-right: 18px; }
    .mfv-don-amount-pills { grid-template-columns: repeat(2, 1fr); }
    .mfv-don-pill--custom { grid-column: 1 / -1; }
}
