/* ── Direct Contribution — Donation Site Styles ───────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --accent:      #c0392b;
  --accent-dark: #962d22;
  --brand:       #1a1a2e;
  --text:        #1a1a2e;
  --text-muted:  #6b7280;
  --border:      #e5e7eb;
  --surface:     #f1f5f9;
  --card:        #ffffff;
  --radius:      12px;
  --shadow:      0 4px 24px rgba(0,0,0,.12);
  --shadow-sm:   0 2px 8px rgba(0,0,0,.06);
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  background: var(--surface);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Site Header ─────────────────────────────────────────────────── */
.site-header {
  background: var(--brand);
  color: #fff;
  padding: .9rem 2rem;
  display: flex;
  align-items: center;
  gap: .75rem;
}

.site-header .logo {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -.02em;
  color: #fff;
  text-decoration: none;
}

.site-header .logo span { color: var(--accent); }

.site-header .tagline {
  font-size: .8rem;
  color: rgba(255,255,255,.5);
  margin-left: auto;
}

/* ── Campaign Hero ────────────────────────────────────────────────── */
.campaign-hero {
  background: linear-gradient(135deg, var(--brand) 0%, var(--accent) 100%);
  color: #fff;
  padding: 2.75rem 2rem 3.5rem;
  text-align: center;
}

.campaign-badge {
  display: inline-block;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 100px;
  padding: .28rem .85rem;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.campaign-hero h1 {
  font-size: clamp(1.55rem, 4vw, 2.4rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: .85rem;
}

.campaign-hero p.subtitle {
  max-width: 620px;
  margin: 0 auto;
  font-size: 1rem;
  opacity: .9;
  line-height: 1.7;
}

/* ── Main / Card Layout ──────────────────────────────────────────── */
main {
  flex: 1;
  max-width: 540px;
  margin: -2.5rem auto 3rem;
  padding: 0 1rem;
  width: 100%;
}

/* ── Donate Card ─────────────────────────────────────────────────── */
.donate-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* ── Frequency Tabs ──────────────────────────────────────────────── */
.frequency-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 2px solid var(--border);
}

.freq-btn {
  padding: .95rem;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-size: .95rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all .15s;
  margin-bottom: -2px;
}

.freq-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: rgba(192,57,43,.04);
}

.freq-btn:hover:not(.active) { background: var(--surface); }

/* ── Form Body ───────────────────────────────────────────────────── */
.form-body { padding: 1.75rem; }

.field-label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: .6rem;
  display: block;
}

/* ── Amount Grid ─────────────────────────────────────────────────── */
.amount-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .5rem;
  margin-bottom: .6rem;
}

.amount-btn {
  padding: .7rem .4rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: none;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  transition: all .15s;
}

.amount-btn:hover { border-color: var(--accent); color: var(--accent); }

.amount-btn.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.custom-amount-wrap {
  position: relative;
  margin-bottom: 1.25rem;
  display: none;
}
.custom-amount-wrap.visible { display: block; }

.custom-amount-wrap .prefix {
  position: absolute;
  left: .85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-weight: 600;
  pointer-events: none;
}

.custom-amount-input {
  width: 100%;
  padding: .7rem .85rem .7rem 1.7rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border .15s;
}

.custom-amount-input:focus { border-color: var(--accent); }

/* ── Donor Info Fields ───────────────────────────────────────────── */
.donor-fields { margin-bottom: 1.25rem; }

.input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .6rem;
}

.form-group { margin-bottom: .6rem; }

.form-group label {
  display: block;
  font-size: .82rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: .28rem;
}

.form-group input[type="text"],
.form-group input[type="email"] {
  width: 100%;
  padding: .68rem .85rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: .95rem;
  font-family: inherit;
  outline: none;
  transition: border .15s;
}

.form-group input:focus { border-color: var(--accent); }

/* ── Payment Method Tabs ─────────────────────────────────────────── */
.payment-methods {
  display: flex;
  gap: .5rem;
  margin-bottom: 1.1rem;
}

.pay-tab {
  flex: 1;
  padding: .55rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: none;
  cursor: pointer;
  font-size: .88rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  transition: all .15s;
}

.pay-tab.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(192,57,43,.04);
}

.pay-tab:hover:not(.active) { border-color: #9ca3af; color: var(--text); }

.pay-tab svg { flex-shrink: 0; }

/* ── Stripe Card Element ─────────────────────────────────────────── */
#card-element-wrap {
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: .85rem;
  margin-bottom: 1rem;
  transition: border .15s;
}
#card-element-wrap.focused { border-color: var(--accent); }

/* ── PayPal Container ────────────────────────────────────────────── */
#paypal-button-container { margin-bottom: 1rem; }

/* ── Monthly Email ───────────────────────────────────────────────── */
#monthly-email-wrap { margin-bottom: 1rem; }

/* ── Donate Button ───────────────────────────────────────────────── */
.donate-btn {
  width: 100%;
  padding: .95rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: .01em;
  transition: background .15s, transform .1s, opacity .15s;
}

.donate-btn:hover  { background: var(--accent-dark); }
.donate-btn:active { transform: scale(.98); }
.donate-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* ── Messages ────────────────────────────────────────────────────── */
.msg {
  padding: .7rem 1rem;
  border-radius: 8px;
  font-size: .88rem;
  margin-bottom: 1rem;
  display: none;
  line-height: 1.45;
}
.msg.error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.msg.warning { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.msg.info    { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }
.msg.visible { display: block; }

/* ── Mini Disclosure ─────────────────────────────────────────────── */
.mini-disclosure {
  margin-top: .9rem;
  font-size: .75rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.5;
}

.mini-disclosure a { color: var(--accent); }

/* ── Secure Badge ────────────────────────────────────────────────── */
.secure-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  margin-top: .75rem;
  font-size: .75rem;
  color: var(--text-muted);
}

/* ── Card Footer (charity note) ──────────────────────────────────── */
.card-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 1rem 1.75rem;
}

.charity-note {
  font-size: .82rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.charity-note strong { color: var(--text); }

/* ── Not-configured Warning ──────────────────────────────────────── */
.setup-notice {
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  font-size: .88rem;
  color: #78350f;
  line-height: 1.5;
}

/* ── Site Footer ─────────────────────────────────────────────────── */
.site-footer {
  background: var(--brand);
  color: rgba(255,255,255,.55);
  text-align: center;
  padding: 1.5rem 2rem;
  font-size: .82rem;
  margin-top: auto;
}

.site-footer a { color: rgba(255,255,255,.75); }
.site-footer a:hover { color: #fff; }
.site-footer .footer-links { margin-top: .4rem; }
.site-footer .footer-links a { margin: 0 .6rem; }

/* ── Thank You Page ──────────────────────────────────────────────── */
.ty-wrap {
  max-width: 500px;
  margin: 3rem auto;
  padding: 0 1rem;
}

.ty-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2.5rem 2rem;
  text-align: center;
}

.ty-icon {
  width: 68px;
  height: 68px;
  background: #dcfce7;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.4rem;
  font-size: 2rem;
}

.ty-card h1 { font-size: 1.6rem; margin-bottom: .5rem; }
.ty-card p  { color: var(--text-muted); margin-bottom: .75rem; line-height: 1.6; }

.ty-back {
  display: inline-block;
  margin-top: 1.25rem;
  padding: .65rem 1.5rem;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  font-weight: 600;
  font-size: .9rem;
  text-decoration: none;
}

.ty-back:hover { background: var(--accent-dark); text-decoration: none; }

.ty-disclosure {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: .78rem;
  color: var(--text-muted);
  text-align: left;
  line-height: 1.55;
}

/* ── Disclosure Page ─────────────────────────────────────────────── */
.disc-wrap {
  max-width: 700px;
  margin: 2.5rem auto;
  padding: 0 1rem 3rem;
}

.disc-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2.5rem;
}

.disc-card h1 { font-size: 1.6rem; margin-bottom: 1.1rem; color: var(--text); }
.disc-card h2 { font-size: 1.1rem; margin: 1.6rem 0 .5rem; color: var(--text); }
.disc-card p  { color: var(--text-muted); line-height: 1.75; margin-bottom: .75rem; }
.disc-card ul { color: var(--text-muted); line-height: 1.75; margin: 0 0 .75rem 1.4rem; }
.disc-card li { margin-bottom: .25rem; }

.disc-card .back-link {
  display: inline-block;
  margin-top: 1.5rem;
  color: var(--accent);
  font-size: .88rem;
  font-weight: 600;
}

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .campaign-hero { padding: 2rem 1.25rem 2.75rem; }
  main { margin-top: -1.5rem; }
  .form-body { padding: 1.25rem; }
  .input-row { grid-template-columns: 1fr; }
  .card-footer { padding: 1rem 1.25rem; }
  .disc-card { padding: 1.5rem; }
}
