/* ═══════════ Donation modal (dg-) — mobile-first, app-like ═══════════ */
#frDonateModal.fr-modal { padding: 24px 12px; }
#frDonateModal .dg-box { background: #f4f6fa; width: 100%; max-width: 520px; border-radius: 22px; overflow: hidden; box-shadow: 0 30px 70px rgba(0,0,0,.35); position: relative; }

.dg-head { background: radial-gradient(120% 140% at 70% 0%, #0b7770 0%, #073b3a 60%); color: #fff; padding: 22px 22px 26px; border-radius: 0 0 26px 26px; display: flex; gap: 14px; align-items: center; position: relative; }
.dg-head-icon { width: 54px; height: 54px; flex: 0 0 54px; border-radius: 50%; background: linear-gradient(135deg, #f7c56a, #e9a23b); display: grid; place-items: center; color: #073b3a; font-size: 22px; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.dg-head h3 { color: #fff; font-size: 20px; margin: 0 0 3px; line-height: 1.25; padding-right: 30px; }
.dg-head p { margin: 0; color: rgba(255,255,255,.78); font-size: 13px; line-height: 1.45; }
.dg-close { position: absolute; right: 14px; top: 12px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 20px; line-height: 1; }
.dg-close:hover { background: rgba(255,255,255,.25); }

.dg-body { padding: 18px 18px 22px; }
.dg-card { background: #fff; border-radius: 20px; padding: 16px 18px 18px; box-shadow: 0 6px 22px rgba(15,35,60,.07); margin-bottom: 20px; }
.dg-amount-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.dg-amount-top span { color: #5b6b7a; font-weight: 700; font-size: 14px; }
.dg-amount-top label { color: #6b7a89; font-size: 13px; cursor: text; margin: 0; }
.dg-amount-row { display: flex; align-items: center; gap: 10px; margin: 8px 0 14px; }
.dg-cur { font-size: 22px; font-weight: 800; color: #0b3a6b; }
.dg-amount-row input { flex: 1; min-width: 0; border: 0; outline: 0; font-size: clamp(32px, 9vw, 42px); font-weight: 900; color: #10202f; background: transparent; padding: 0; letter-spacing: -.5px; }
.dg-amount-row input::placeholder { color: #c4cdd6; }
.dg-clear { width: 30px; height: 30px; border-radius: 50%; border: 0; background: #6b7a89; color: #fff; display: grid; place-items: center; font-size: 13px; flex: 0 0 30px; }
.dg-clear[hidden] { display: none; }
.dg-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.dg-chips button { border: 0; background: #faf1e2; color: #1d2a36; font-weight: 800; padding: 10px 16px; border-radius: 30px; font-size: 15px; transition: background .15s ease, transform .15s ease; }
.dg-chips button:hover { transform: translateY(-1px); }
.dg-chips button.active { background: #e3a527; color: #10202f; }
.dg-min { color: #8a97a5; font-size: 12px; margin-top: 10px; }

.dg-label { font-size: 16px; font-weight: 800; color: #10202f; margin: 0 0 10px 2px; }
.dg-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.dg-method { background: #fff; border: 2px solid #e6eaf0; border-radius: 16px; padding: 12px 6px 10px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-weight: 700; color: #1d2a36; font-size: 13.5px; transition: border-color .15s ease, background .15s ease, transform .15s ease; box-shadow: 0 2px 8px rgba(15,35,60,.04); }
.dg-method:hover { transform: translateY(-1px); }
.dg-method i { font-size: 22px; }
.dg-method[hidden] { display: none; }
.dg-method.active { border-color: var(--dg-c, #0b7770); background: color-mix(in srgb, var(--dg-c, #0b7770) 12%, #fff); box-shadow: 0 0 0 3px color-mix(in srgb, var(--dg-c, #0b7770) 18%, transparent); }
.dg-method[data-provider="mpesa"]    { --dg-c: #e60000; } .dg-method[data-provider="mpesa"] i { color: #e60000; }
.dg-method[data-provider="tigo"]     { --dg-c: #1d63d8; } .dg-method[data-provider="tigo"] i { color: #1d63d8; }
.dg-method[data-provider="airtel"]   { --dg-c: #d6141d; } .dg-method[data-provider="airtel"] i { color: #d6141d; }
.dg-method[data-provider="halopesa"] { --dg-c: #f07c00; } .dg-method[data-provider="halopesa"] i { color: #f07c00; }
.dg-method[data-method="card"]       { --dg-c: #5b5fc7; } .dg-method[data-method="card"] i { color: #5b5fc7; }
.dg-method[data-method="bank"]       { --dg-c: #0b7770; } .dg-method[data-method="bank"] i { color: #0b7770; }

.dg-panel { background: #fff; border-radius: 16px; padding: 14px 16px; margin-bottom: 18px; box-shadow: 0 2px 10px rgba(15,35,60,.05); }
.dg-panel[hidden] { display: none; }
.dg-panel label { display: block; font-weight: 700; font-size: 13px; color: #34495e; margin-bottom: 6px; }
.dg-phone { display: flex; border: 2px solid #e1e6ec; border-radius: 12px; overflow: hidden; transition: border-color .15s ease; }
.dg-phone:focus-within { border-color: #0b7770; }
.dg-phone span { background: #f4f6fa; padding: 0 12px; display: grid; place-items: center; font-weight: 800; color: #1d2a36; }
.dg-phone input { flex: 1; min-width: 0; border: 0; outline: 0; padding: 12px; font-size: 17px; font-weight: 700; letter-spacing: .5px; }
.dg-note { color: #6b7a89; font-size: 12.5px; margin-top: 8px; display: flex; gap: 6px; align-items: flex-start; }
.dg-note i { color: #0b7770; margin-top: 2px; }

.dg-fields { display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 10px; }
.dg-fields input, .dg-more textarea { width: 100%; border: 2px solid #e1e6ec; border-radius: 12px; padding: 12px 14px; font-size: 15px; outline: 0; background: #fff; }
.dg-fields input:focus, .dg-more textarea:focus { border-color: #0b7770; }
.dg-more { margin-bottom: 16px; }
.dg-more summary { cursor: pointer; color: #0b7770; font-weight: 700; font-size: 14px; list-style: none; padding: 4px 2px; }
.dg-more summary::-webkit-details-marker { display: none; }
.dg-more[open] summary { margin-bottom: 8px; }
.dg-more textarea { min-height: 70px; resize: vertical; }
.dg-check { display: flex; gap: 8px; align-items: center; font-size: 14px; color: #34495e; margin-top: 8px; }
.dg-check input { width: 17px; height: 17px; accent-color: #0b7770; }

.dg-give { width: 100%; border: 0; border-radius: 18px; background: #e3a527; color: #10202f; font-weight: 900; font-size: 18px; padding: 17px 16px; display: flex; align-items: center; justify-content: center; gap: 10px; box-shadow: 0 10px 24px rgba(227,165,39,.35); transition: transform .15s ease, box-shadow .15s ease; }
.dg-give:hover { transform: translateY(-1px); box-shadow: 0 14px 28px rgba(227,165,39,.42); }
.dg-give[disabled] { opacity: .7; transform: none; }
.dg-secure { text-align: center; color: #8a97a5; font-size: 12.5px; margin: 12px 0 0; line-height: 1.5; }
.dg-secure i { color: #22a06b; }
.dg-errors { background: #fdecec; color: #9b1c1c; border-radius: 12px; padding: 11px 14px; font-size: 14px; font-weight: 600; margin-bottom: 14px; }
.dg-errors[hidden] { display: none; }

/* Waiting for PIN approval */
.dg-screen { padding: 30px 24px 28px; text-align: center; }
.dg-screen[hidden] { display: none; }
.dg-phone-anim { width: 92px; height: 92px; margin: 6px auto 18px; border-radius: 50%; background: #e7f3ef; display: grid; place-items: center; position: relative; color: #0b7770; font-size: 38px; }
.dg-phone-anim:before, .dg-phone-anim:after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(11,119,112,.35); animation: dgRing 2s ease-out infinite; }
.dg-phone-anim:after { animation-delay: 1s; }
.dg-phone-anim i { animation: dgBuzz 1.6s ease-in-out infinite; }
@keyframes dgRing { from { transform: scale(1); opacity: 1; } to { transform: scale(1.7); opacity: 0; } }
@keyframes dgBuzz { 0%, 60%, 100% { transform: rotate(0); } 65% { transform: rotate(-10deg); } 70% { transform: rotate(10deg); } 75% { transform: rotate(-8deg); } 80% { transform: rotate(8deg); } }
.dg-screen h3 { color: #10202f; font-size: 24px; margin: 0 0 8px; }
.dg-screen p { color: #5b6b7a; font-size: 15px; line-height: 1.6; margin: 0 auto 16px; max-width: 380px; }
.dg-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 18px 0; text-align: center; }
.dg-steps div { background: #fff; border-radius: 14px; padding: 12px 6px; font-size: 12.5px; color: #34495e; font-weight: 600; box-shadow: 0 2px 8px rgba(15,35,60,.05); }
.dg-steps b { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #0b7770; color: #fff; margin: 0 auto 6px; font-size: 12px; }
.dg-waiting { display: inline-flex; align-items: center; gap: 8px; color: #0b7770; font-weight: 700; font-size: 14px; background: #e7f3ef; padding: 8px 14px; border-radius: 30px; }
.dg-dots span { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #0b7770; margin: 0 1px; animation: dgDot 1.2s infinite; }
.dg-dots span:nth-child(2) { animation-delay: .2s; } .dg-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes dgDot { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.dg-screen .dg-links { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.dg-link-btn { border: 2px solid #d5dde5; background: #fff; color: #1d2a36; font-weight: 700; border-radius: 12px; padding: 10px 16px; font-size: 14px; }
.dg-link-btn.primary { border-color: #0b7770; background: #0b7770; color: #fff; }
.dg-success-icon { width: 92px; height: 92px; margin: 6px auto 18px; border-radius: 50%; background: #e3f4ec; color: #22a06b; display: grid; place-items: center; font-size: 42px; animation: dgPop .5s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes dgPop { from { transform: scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }

@media (min-width: 480px) {
    .dg-methods.has-mobile { grid-template-columns: repeat(3, 1fr); }
    .dg-fields { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 575px) {
    #frDonateModal.fr-modal { padding: 0; align-items: flex-end; }
    #frDonateModal .dg-box { border-radius: 22px 22px 0 0; max-height: 96vh; overflow-y: auto; }
    .dg-body { padding: 16px 14px 20px; }
}
