:root {
  --green: #2d79bf;
  --green-dark: #1f5f99;
  --blue: #2d79bf;
  --ink: #1d2a3a;
  --muted: #667085;
  --line: #d9e1ea;
  --surface: #ffffff;
  --soft: #f5f8fb;
  --shadow: 0 20px 55px rgba(29, 42, 58, 0.16);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, "Helvetica Neue", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.76)),
    url("assets/campaign-hero.png") center / cover fixed no-repeat;
}

button,
input,
textarea {
  font: inherit;
}

.donation-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
}

.checkout {
  width: min(100%, 440px);
}

.donation-card {
  width: 100%;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 24px 70px rgba(29, 42, 58, 0.18);
  backdrop-filter: blur(18px) saturate(1.1);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
}

.card-header {
  padding: 24px 18px 22px;
  background:
   black;
  border-bottom: 4px solid var(--green);
}

.brand {
  display: grid;
  justify-items: center;
  align-items: center;
  gap: 8px;
  width: 100%;
  color: var(--ink);
  text-align: center;
  text-decoration: none;
}

.brand__logo {
  display: block;
  width: min(270px, 82%);
  height: auto;
  object-fit: contain;
}

.brand small {
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.92rem;
  font-weight: 700;
}

.form-header {
  display: grid;
  align-items: center;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  margin-bottom: 14px;
  padding: 20px 18px 0;
}

.form-header::before,
.form-header::after {
  content: "";
  height: 1px;
  background: rgba(170, 184, 201, 0.42);
}

.panel-label {
  margin: 0;
  color: #7a7f87;
  font-size: 0.98rem;
  font-style: italic;
  font-weight: 500;
  white-space: nowrap;
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  margin-bottom: 10px;
  color: #405166;
  font-size: 0.93rem;
  font-weight: 700;
}

.methods label {
  position: relative;
  cursor: pointer;
}

.methods input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.methods {
  display: grid;
  gap: 9px;
  margin-top: 4px;
  padding: 0 18px;
}

.methods legend {
  padding-top: 0;
}

.methods label {
  display: grid;
  grid-template-columns: 96px 1fr 30px;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 10px;
  border: 2px solid rgba(191, 204, 220, 0.78);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  transition: 160ms ease;
}

.methods label::after {
  content: "";
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: transparent;
}

.methods label:has(input:checked) {
  border-color: var(--green);
}

.methods label:has(input:focus-visible) {
  outline: 3px solid rgba(20, 120, 200, 0.2);
  outline-offset: 2px;
}

.methods label:has(input:checked)::after {
  content: "✓";
  background: var(--green);
  color: #ffffff;
  font-weight: 800;
}

.methods strong,
.methods small {
  display: block;
}

.methods small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.82rem;
}

.card-brands,
.method-icon,
.method-logo {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  font-weight: 900;
}

.card-brands {
  display: flex;
  width: 92px;
  gap: 8px;
  justify-content: flex-start;
  background: transparent;
}

.card-brands img {
  display: block;
  width: 40px;
  max-height: 28px;
  object-fit: contain;
}

.method-logo {
  width: 92px;
  background: transparent;
}

.method-logo img {
  display: block;
  width: 100%;
  max-height: 30px;
  height: auto;
  object-fit: contain;
}

.card-icon {
  background:
    linear-gradient(#ffffff 0 0) 9px 20px / 19px 3px no-repeat,
    linear-gradient(#ffffff 0 0) 9px 12px / 13px 3px no-repeat,
    var(--blue);
}

.payment-panel {
  margin: 12px 18px 0;
}

.card-payment {
  display: grid;
  gap: 12px;
}

.panel-intro {
  padding: 14px;
  border: 1px solid rgba(20, 120, 200, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
}

.panel-intro h3 {
  margin: 0 0 5px;
  font-size: 1rem;
}

.panel-intro p,
.paypal-panel p {
  margin: 0;
  color: #4d5d6d;
  font-size: 0.9rem;
  line-height: 1.45;
}

.paypal-button {
  width: 100%;
  margin: 12px 0 0;
}

.zeffy-embed {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  border: 1px solid rgba(191, 204, 220, 0.78);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.zeffy-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 96px;
  padding: 18px;
  color: #4d5d6d;
  font-size: 0.9rem;
}

.zeffy-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(20, 120, 200, 0.18);
  border-top-color: var(--blue);
  border-radius: 999px;
  animation: spin 800ms linear infinite;
}

.zeffy-embed[data-state="ready"] .zeffy-loading,
.zeffy-embed[data-state="fallback"] .zeffy-loading {
  display: none;
}

.zeffy-fallback-frame {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 720px;
}

.zeffy-fallback-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.trust-note {
  margin: 0;
  padding: 0 4px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
  text-align: center;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.manual-panel {
  margin: 12px 18px 0;
  padding: 14px;
  border: 1px solid rgba(45, 121, 191, 0.24);
  border-radius: 8px;
  background: rgba(240, 247, 253, 0.76);
}

.manual-panel h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.manual-panel p {
  margin: 0 0 12px;
  color: #4d5d6d;
  font-size: 0.9rem;
  line-height: 1.45;
}

.qr-wrap {
  display: grid;
  place-items: center;
  margin: 2px 0 12px;
  padding: 12px;
  border: 1px solid rgba(45, 121, 191, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.qr-wrap img {
  display: block;
  width: min(190px, 100%);
  aspect-ratio: 1;
  object-fit: contain;
}

.manual-panel[data-method="cashapp"] .qr-wrap {
  border-color: rgba(0, 0, 0, 0.72);
  background: #050505;
}

.manual-data {
  display: grid;
  gap: 8px;
}

.manual-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(45, 121, 191, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.64);
}

.manual-row small,
.manual-row strong {
  display: block;
}

.manual-row small {
  margin-bottom: 2px;
  color: #4d5d6d;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.manual-row strong {
  overflow-wrap: anywhere;
  font-size: 0.95rem;
}

.primary-button,
.secondary-button,
.copy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
  transition: 160ms ease;
}

.primary-button {
  width: calc(100% - 36px);
  min-height: 52px;
  margin: 14px 18px 0;
  border: 0;
  background: var(--green);
  color: #ffffff;
}

.primary-button:hover {
  background: var(--green-dark);
}

.paypal-panel .paypal-button {
  width: 100%;
  margin: 12px 0 0;
}

.secondary-button {
  width: 100%;
  min-height: 42px;
  margin-top: 10px;
  border: 1px solid rgba(45, 121, 191, 0.24);
  background: var(--green);
  color: #ffffff;
  text-decoration: none;
}

.secondary-button:hover {
  background: var(--green-dark);
}

.copy-button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(45, 121, 191, 0.22);
  background: rgba(255, 255, 255, 0.9);
  color: var(--green-dark);
  font-size: 0.82rem;
}

.secure-note {
  margin: 4px 18px 6px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
  text-align: center;
}

.privacy-note {
  margin: 12px 18px 4px;
  color: #7a8797;
  font-size: 0.72rem;
  line-height: 1.35;
  text-align: center;
}

.impact-note {
  margin: 10px 18px 18px;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: min(360px, calc(100vw - 36px));
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: #ffffff;
  font-weight: 700;
  opacity: 0;
  transform: translateY(10px);
  transition: 180ms ease;
  pointer-events: none;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 480px) {
  .donation-page {
    padding: 14px;
    align-items: start;
  }

  .donation-card {
    padding: 0;
  }

  .zeffy-embed {
    min-height: 700px;
  }
}
