/* FundMySite front-end styles. Colours come from CSS variables set in Settings → Appearance. */

/* ---------- Base card ---------- */
.fundmysite-wrap{--fu-primary:var(--fundmysite-primary,#2563eb);--fu-dark:var(--fundmysite-dark,#1e293b);--fu-light:var(--fundmysite-light,#f8fafc);--fu-border:var(--fundmysite-border,#dbeafe);max-width:680px;margin:24px auto;padding:26px;border:1px solid var(--fu-border);border-radius:18px;background:#fff;color:#1f2937;box-shadow:0 1px 2px rgba(15,23,42,.04),0 14px 34px -14px rgba(15,23,42,.14);font-family:inherit;line-height:1.55;box-sizing:border-box}
.fundmysite-wrap *{box-sizing:border-box}
.fundmysite-wrap h2,.fundmysite-wrap h3{margin:0 0 10px;color:var(--fu-dark);line-height:1.25}
.fundmysite-title{font-size:clamp(22px,4vw,28px)}
/* A wrapper inside another wrapper is only a section, never a second card. */
.fundmysite-wrap .fundmysite-wrap{max-width:none;margin:14px 0 0;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none}

/* ---------- Summary: status boxes + progress ---------- */
.fundmysite-summary{background:linear-gradient(160deg,var(--fu-light),#fff 65%)}
/* Same, tight space above "campaign title" and "Choose your contribution"; theme heading margins are neutralised. */
.fundmysite-wrap.fundmysite-summary-title,.fundmysite-wrap.fundmysite-form-wrap{padding-top:16px}
.fundmysite-wrap.fundmysite-summary-title>.fundmysite-title,.fundmysite-wrap.fundmysite-form-wrap>.fundmysite-form-title{margin-top:0!important;padding-top:0!important}
.fundmysite-summary-title>.fundmysite-title{margin-bottom:14px}
.fundmysite-status-rows{display:flex;flex-direction:column;gap:10px;width:100%;min-width:0;margin:0 0 14px}
.fundmysite-status-first-row{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(0,1fr);gap:10px;min-width:0}
.fundmysite-status-first-row.single-item{grid-template-columns:minmax(0,1fr)}
.fundmysite-pills{display:flex;min-width:0;margin:0}
.fundmysite-metrics-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(112px,1fr));gap:10px}
.fundmysite-pill{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:13px 10px;text-align:center;background:var(--fundmysite-stat-bg,#eef4ff);border:0;border-top:4px solid var(--fundmysite-stat-accent,#2563eb);border-radius:var(--fundmysite-stat-radius,12px);color:var(--fundmysite-stat-label,#475569);line-height:1.3}
.fundmysite-pill-label{width:100%;font-size:12px;font-weight:600;letter-spacing:.02em;color:var(--fundmysite-stat-label,#475569);overflow-wrap:anywhere}
.fundmysite-pill strong{display:block;width:100%;font-size:clamp(15px,2.2vw,20px);font-weight:800;color:var(--fundmysite-stat-value,#1e293b);overflow-wrap:anywhere}
/* Status box styles chosen in Settings → Appearance */
.fundmysite-pills-soft .fundmysite-pill{border-top:0}
.fundmysite-pills-left .fundmysite-pill{border-top:0;border-left:5px solid var(--fundmysite-stat-accent,#2563eb)}
.fundmysite-pills-pill .fundmysite-pill{border:1px solid var(--fundmysite-stat-accent,#2563eb);border-radius:999px;padding:11px 18px}
.fundmysite-pills-pill .fundmysite-pill strong{font-size:clamp(14px,2vw,18px)}
.fundmysite-pills-solid .fundmysite-pill{background:var(--fundmysite-stat-accent,#2563eb);border-top:0}
.fundmysite-pills-solid .fundmysite-pill-label{color:rgba(255,255,255,.85)}
.fundmysite-pills-solid .fundmysite-pill strong{color:#fff}
.fundmysite-pills-outline .fundmysite-pill{background:transparent;border:2px solid var(--fundmysite-stat-accent,#2563eb)}

.fundmysite-progress{margin:6px 0 4px}
.fundmysite-progress-note{margin:0 0 8px;text-align:center;font-size:14px;font-weight:700;color:var(--fu-dark)}
.fundmysite-bar{height:14px;background:var(--fu-light);border:1px solid var(--fu-border);border-radius:99px;overflow:hidden}
.fundmysite-bar-fill{position:relative;height:100%;border-radius:99px;overflow:hidden;background:linear-gradient(90deg,var(--fu-primary),color-mix(in srgb,var(--fu-primary) 62%,#fff));background-size:200% 100%;transform-origin:left center;transition:width .8s cubic-bezier(.22,.8,.25,1);animation:fundmysite-progress-grow 1.1s cubic-bezier(.22,.8,.25,1) both,fundmysite-progress-flow 3s linear 1.1s infinite;box-shadow:0 0 8px color-mix(in srgb,var(--fu-primary) 35%,transparent)}
.fundmysite-bar-fill::after{content:"";position:absolute;top:0;bottom:0;left:0;width:40%;background:linear-gradient(90deg,transparent,rgba(255,255,255,.7),transparent);transform:translateX(-160%);animation:fundmysite-progress-shimmer 1.6s ease-in-out infinite;pointer-events:none}
@keyframes fundmysite-progress-grow{from{transform:scaleX(0)}to{transform:scaleX(1)}}
@keyframes fundmysite-progress-flow{0%{background-position:0 0}100%{background-position:-200% 0}}
@keyframes fundmysite-progress-shimmer{0%{transform:translateX(-160%)}100%{transform:translateX(360%)}}
.fundmysite-bar-meta{display:flex;justify-content:space-between;gap:10px;margin-top:6px;font-size:12px;color:#4b5563}

/* ---------- Buttons ---------- */
.fundmysite-btn{display:inline-block;padding:14px 22px;border:0;border-radius:10px;font-size:16px;font-weight:700;text-align:center;text-decoration:none!important;cursor:pointer;line-height:1.2;transition:background-color .2s ease,color .2s ease,border-color .2s ease,box-shadow .2s ease,transform .2s ease}
.fundmysite-btn:hover{transform:translateY(-1px)}
.fundmysite-btn-primary{background:var(--fu-primary);color:#fff!important;box-shadow:0 8px 18px -8px color-mix(in srgb,var(--fu-primary) 70%,transparent)}
.fundmysite-btn-primary:hover,.fundmysite-btn-primary:focus-visible{background:var(--fu-dark)}
.fundmysite-btn-ghost{background:transparent;color:var(--fu-primary)!important;border:2px solid var(--fu-primary);padding:12px 20px}
.fundmysite-btn-ghost:hover{background:var(--fu-light)}
.fundmysite-btn-paypal{background:#ffc439;color:#17212b!important}
.fundmysite-btn-paypal:hover,.fundmysite-btn-paypal:focus-visible{background:#f2b520;box-shadow:0 4px 12px rgba(0,0,0,.16)}
.fundmysite-btn-external{background:#ffdd00;color:#171717!important}
.fundmysite-btn-external:hover,.fundmysite-btn-external:focus-visible{background:#e5b900;color:#111!important;box-shadow:0 4px 12px rgba(0,0,0,.18)}
.fundmysite-ext-2{background:#29abe0;color:#fff!important}
.fundmysite-ext-2:hover,.fundmysite-ext-2:focus-visible{background:#087eaf;color:#fff!important;box-shadow:0 4px 12px rgba(0,0,0,.18)}
.fundmysite-btn:focus-visible{outline:3px solid currentColor;outline-offset:3px}
.fundmysite-form .fundmysite-submit{display:block;width:100%;margin-top:16px}
.fundmysite-submit[disabled]{opacity:.6;cursor:wait;transform:none}
.fundmysite-external{display:flex;flex-direction:column;gap:10px;margin-top:14px}
.fundmysite-external .fundmysite-btn{display:block;width:100%}
.fundmysite-wrap.fundmysite-cta{margin:16px 0 0;text-align:center}
.fundmysite-cta .fundmysite-btn{display:block;width:100%;max-width:100%;margin:0 auto;white-space:normal;overflow-wrap:anywhere}

/* ---------- Donation form ---------- */
.fundmysite-form-title{margin-bottom:8px}
.fundmysite-hp{position:absolute!important;left:-9999px!important;width:1px;height:1px;overflow:hidden}
.fundmysite-amounts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:14px 0}
.fundmysite-amount{position:relative;display:block;cursor:pointer}
.fundmysite-amount input{position:absolute;opacity:0;pointer-events:none}
.fundmysite-amount span{display:block;padding:14px 8px;border:2px solid var(--fu-border);border-radius:12px;text-align:center;font-weight:700;background:var(--fu-light);color:var(--fu-dark);transition:background .15s,color .15s,border-color .15s,box-shadow .15s}
.fundmysite-amount:hover span{border-color:var(--fu-primary)}
.fundmysite-amount input:checked+span{background:var(--fu-primary);border-color:var(--fu-primary);color:#fff;box-shadow:0 6px 14px -8px var(--fu-primary)}
.fundmysite-amount input:focus-visible+span{outline:3px solid var(--fu-border);outline-offset:2px}
.fundmysite-field{display:block;margin:12px 0}
.fundmysite-field>span{display:block;margin-bottom:5px;font-size:14px;font-weight:600}
.fundmysite-field .fundmysite-custom-amount-wrap{display:flex;align-items:stretch;width:100%;margin-top:5px;overflow:hidden;background:#fff;border:1px solid #cbd5e1;border-radius:10px}
.fundmysite-field .fundmysite-custom-amount-wrap:focus-within{outline:2px solid var(--fu-primary);border-color:var(--fu-primary)}
.fundmysite-field .fundmysite-currency-prefix{display:flex;align-items:center;justify-content:center;padding:0 14px;background:var(--fu-light);border-right:1px solid #cbd5e1;font-weight:700;white-space:nowrap}
.fundmysite-field input.fundmysite-custom-amount{flex:1;min-width:0;width:100%;padding:12px;border:0;border-radius:0;outline:0;box-shadow:none;background:#fff;font:inherit}
.fundmysite-field input.fundmysite-custom-amount:focus{outline:0;border:0;box-shadow:none}
.fundmysite-field .fundmysite-custom-amount-stepper{display:flex;flex-direction:column;flex:0 0 34px;align-self:stretch;margin:0;padding:0;background:#f8fafc;border-left:1px solid #cbd5e1}
.fundmysite-field .fundmysite-custom-amount-stepper button{display:flex;align-items:center;justify-content:center;flex:1;width:100%;min-height:0;padding:0 8px;border:0;border-radius:0;background:transparent;color:#374151;font-size:10px;line-height:1;cursor:pointer}
.fundmysite-field .fundmysite-custom-amount-stepper button+button{border-top:1px solid #cbd5e1}
.fundmysite-field .fundmysite-custom-amount-stepper button:hover{background:var(--fu-light);color:var(--fu-dark)}
.fundmysite-field .fundmysite-custom-amount-stepper button:focus-visible{outline:2px solid var(--fu-primary);outline-offset:-2px}
.fundmysite-field .fundmysite-custom-amount-wrap input[type=hidden]{display:none}
.fundmysite-field input[type=text],.fundmysite-field input[type=email],.fundmysite-field input[type=tel],.fundmysite-field input[type=number],.fundmysite-field textarea{width:100%;padding:12px;border:1px solid #cbd5e1;border-radius:10px;background:#fff;font:inherit}
.fundmysite-field input:focus,.fundmysite-field textarea:focus{outline:2px solid var(--fu-primary);border-color:var(--fu-primary)}
.fundmysite-check{display:flex;gap:8px;align-items:center;margin:14px 0;font-size:14px}
.fundmysite-gateways{margin:14px 0;padding:10px 14px;border:1px solid var(--fu-border);border-radius:12px}
.fundmysite-gateways legend{padding:0 6px;font-size:14px;font-weight:700}
.fundmysite-gateway{display:flex;gap:8px;align-items:center;padding:6px 0;cursor:pointer}
.fundmysite-gateway-notice{margin:10px 0;padding:12px 14px;background:var(--fu-light);border:1px dashed var(--fu-border);border-radius:10px;font-size:14px}
.fundmysite-gateway-notice p:last-child{margin-bottom:0}

/* ---------- Notices ---------- */
.fundmysite-notice{margin:0 0 16px;padding:12px 14px;border-radius:10px}
.fundmysite-warn{background:#fff7ed;color:#9a3412}
.fundmysite-error{background:#fef2f2;color:#991b1b}

/* ---------- Supporters ---------- */
.fundmysite-donors{background:linear-gradient(160deg,var(--fu-light),#fff 65%)}
.fundmysite-donor{display:flex;align-items:center;gap:12px;margin:9px 0;padding:12px;background:#fff;border:1px solid #e5e7eb;border-radius:12px;box-shadow:0 2px 7px rgba(15,23,42,.035)}
.fundmysite-donor-avatar{display:flex;align-items:center;justify-content:center;flex:0 0 40px;width:40px;height:40px;border-radius:50%;background:var(--fu-primary);color:#fff;font-size:15px;font-weight:800;text-transform:uppercase}
.fundmysite-donor-info{min-width:0;flex:1}
.fundmysite-donor-name{display:block;color:#1f2937;font-weight:700;overflow-wrap:anywhere}
.fundmysite-donor-date{display:block;margin-top:3px;color:#6b7280;font-size:12px}
.fundmysite-donor-amount{flex-shrink:0;padding:6px 10px;border-radius:999px;background:var(--fu-light);border:1px solid var(--fu-border);color:var(--fu-dark);font-size:12px;font-weight:800}
.fundmysite-donors-empty{padding:16px;border:1px dashed var(--fu-border);border-radius:12px;text-align:center;background:#fff;color:#6b7280}
.fundmysite-donors-spoiler{width:100%;min-width:0}
.fundmysite-donors-toggle{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:13px 15px;cursor:pointer;list-style:none;border:1px solid var(--fu-border);border-radius:12px;background:var(--fu-light);color:var(--fu-dark);font-weight:800;line-height:1.4;transition:background-color .18s ease,border-color .18s ease,color .18s ease}
.fundmysite-donors-toggle::-webkit-details-marker{display:none}
.fundmysite-donors-toggle::after{content:'＋';margin-left:auto;font-size:18px;font-weight:800}
.fundmysite-donors-spoiler[open]>.fundmysite-donors-toggle::after{content:'−'}
.fundmysite-donors-toggle:hover,.fundmysite-donors-toggle:focus-visible{background:var(--fu-primary);border-color:var(--fu-primary);color:#fff;outline-offset:3px}
.fundmysite-donors-toggle-hint{font-size:12px;font-weight:500;opacity:.8}
.fundmysite-donors-content{padding-top:8px}

/* ---------- Campaign grid + cards ---------- */
.fundmysite-grid{display:grid;gap:20px;margin:24px 0}
.fundmysite-cols-1{grid-template-columns:1fr}
.fundmysite-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.fundmysite-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.fundmysite-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}
.fundmysite-card{transition:box-shadow .2s ease,transform .2s ease}
.fundmysite-card:hover{transform:translateY(-2px);box-shadow:0 1px 2px rgba(15,23,42,.04),0 20px 40px -16px rgba(15,23,42,.2)}
.fundmysite-grid .fundmysite-card{display:flex;flex-direction:column;margin:0;max-width:none}
.fundmysite-card-image img{display:block;width:100%;height:auto;margin-bottom:12px;border-radius:12px}
.fundmysite-card-title{font-size:20px}
.fundmysite-card-title a{color:inherit;text-decoration:none}
.fundmysite-card-excerpt{color:#4b5563}
.fundmysite-card-actions{display:flex;flex-wrap:wrap;gap:10px;margin:auto 0 0;padding-top:14px}
.fundmysite-card-actions .fundmysite-btn{padding:10px 16px;font-size:15px}
.fundmysite-card-actions .fundmysite-btn-ghost{padding:8px 14px}

/* ---------- Receipt + my donations ---------- */
.fundmysite-receipt-table{width:100%;margin:16px 0;border-collapse:collapse}
.fundmysite-receipt-table th,.fundmysite-receipt-table td{padding:9px 6px;border-bottom:1px solid #e5e7eb;font-size:14px;text-align:left}
.fundmysite-receipt-table th{width:38%;color:#6b7280;font-weight:600}
.fundmysite-table-full th{width:auto}
.fundmysite-my-donations{overflow-x:auto}
.fundmysite-thanks{margin:14px 0;padding:12px 14px;background:var(--fu-light);border-left:4px solid var(--fu-primary);border-radius:8px}
.fundmysite-stat{font-weight:800}

/* ---------- Widget (compact) ---------- */
.fundmysite-wrap.fundmysite-widget-compact{max-width:none;margin:0;padding:16px;box-shadow:none}
.fundmysite-widget-compact .fundmysite-status-rows{gap:8px}
.fundmysite-widget-compact .fundmysite-status-first-row{gap:8px}
.fundmysite-widget-compact .fundmysite-metrics-row{grid-template-columns:repeat(auto-fit,minmax(78px,1fr));gap:8px}
.fundmysite-widget-compact .fundmysite-pill{padding:9px 5px}
.fundmysite-widget-compact .fundmysite-pill-label{font-size:11px}
.fundmysite-widget-compact .fundmysite-pill strong{font-size:clamp(12px,1.6vw,16px)}

/* ---------- Responsive + motion ---------- */
@media(max-width:780px){.fundmysite-cols-3,.fundmysite-cols-4{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){
  .fundmysite-wrap{padding:18px;border-radius:16px}
  .fundmysite-wrap.fundmysite-summary-title,.fundmysite-wrap.fundmysite-form-wrap{padding-top:14px}
  .fundmysite-status-rows,.fundmysite-status-first-row{gap:7px}
  .fundmysite-metrics-row{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
  .fundmysite-metrics-row .fundmysite-pill:last-child:nth-child(odd){grid-column:1/-1}
  .fundmysite-pill{padding:10px 6px}
  .fundmysite-amounts{gap:7px}
  .fundmysite-amount span{padding:12px 5px}
  .fundmysite-cols-2,.fundmysite-cols-3,.fundmysite-cols-4{grid-template-columns:1fr}
  .fundmysite-donors-toggle{padding:11px 12px}
  .fundmysite-donors-toggle-hint{font-size:11px}
}
@media(prefers-reduced-motion:reduce){
  .fundmysite-bar-fill{transition:none;animation:none;background-position:50% 0}
  .fundmysite-bar-fill::after{display:none}
  .fundmysite-btn,.fundmysite-card{transition:none}
  .fundmysite-btn:hover,.fundmysite-card:hover{transform:none}
}

/* ---------- Preformatted text / embed snippets (follows the donation palette) ---------- */
.fundmysite-wrap pre,.fundmysite-wrap code{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace}
.fundmysite-wrap pre{display:block;max-width:100%;margin:16px 0;padding:16px 18px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;background:var(--fu-light);color:var(--fu-dark);border:1px solid var(--fu-border);border-left:5px solid var(--fu-primary);border-radius:10px;box-shadow:0 3px 12px rgba(15,23,42,.06);font-size:14px;line-height:1.65;font-weight:600}
.fundmysite-wrap code{padding:2px 6px;border-radius:5px;background:var(--fu-light);color:var(--fu-primary);border:1px solid var(--fu-border);font-size:.92em;overflow-wrap:anywhere}
.fundmysite-wrap pre code{padding:0;background:transparent;border:0;color:inherit;font-size:inherit}
.fundmysite-wrap pre:focus-visible{outline:3px solid var(--fu-primary);outline-offset:3px}
