:root {
  --green: #55b96a;
  --green-dark: #47a058;
  --pink: #f91a64;
  --pink-dark: #d80f51;
  --lime: #86b440;
  --deep: #0f2213;
  --cream: #f8f7f3;
  --ink: rgba(8, 28, 20, 0.86);
  --ink-55: rgba(8, 28, 20, 0.56);
  --line: #e7e6e0;
  --radius: 0 20px 0 20px;
}
/* The `hidden` attribute must win over component display rules (.field is display:block,
   which otherwise shows hidden fields - e.g. an empty "Which fund?" on assign-mode campaigns).
   Same rule admin.css already has. */
[hidden] {
  display: none !important;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--cream);
  background-image: radial-gradient(1200px 500px at 50% -10%, rgba(85, 185, 106, 0.14), transparent);
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 20px;
}

.card {
  background: #fff;
  width: 100%;
  max-width: 480px;
  border-radius: var(--radius);
  box-shadow: 0 18px 50px rgba(15, 34, 19, 0.12);
  padding: 30px 30px 22px;
  border: 1px solid var(--line);
}

.head {
  text-align: center;
}
.logo {
  height: 46px;
  width: auto;
  max-width: 82%;
  object-fit: contain;
}
.tag {
  margin: 12px 0 0;
  color: var(--ink-55);
  font-size: 14.5px;
}

.banner {
  margin-top: 18px;
  background: #fff7d6;
  border: 1px solid #f0e2a0;
  color: #6f5300;
  font-size: 12.5px;
  padding: 9px 11px;
  border-radius: 10px;
  line-height: 1.5;
}
.banner code {
  background: rgba(0, 0, 0, 0.06);
  padding: 1px 5px;
  border-radius: 4px;
}

/* frequency toggle */
.freq {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 5px;
  margin: 22px 0 18px;
}
.freq-btn {
  border: 0;
  background: transparent;
  padding: 10px;
  font: inherit;
  font-weight: 600;
  color: var(--ink-55);
  border-radius: 9px;
  cursor: pointer;
}
.freq-btn.selected {
  background: #fff;
  color: var(--deep);
  box-shadow: 0 1px 4px rgba(15, 34, 19, 0.12);
}

/* fields */
.field {
  display: block;
  margin: 14px 0;
}
.field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-55);
  margin-bottom: 6px;
}
/* Small explanatory line under a field (campaign blurb, fund note, minimum). */
.field-hint {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-55);
  margin: -6px 0 14px;
}
.input {
  width: 100%;
  font: inherit;
  font-size: 15px;
  padding: 12px 13px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}
.input:focus {
  outline: 0;
  border-color: var(--green);
}
select.input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%230f2213' stroke-width='1.6' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.amount-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
}
.currency-select {
  width: auto;
  padding: 7px 30px 7px 11px;
  font-size: 13px;
  font-weight: 600;
}

.amounts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
}
.amt {
  padding: 13px 0;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--deep);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.12s ease;
}
.amt:hover {
  border-color: var(--green);
}
.amt.selected {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.custom {
  margin-top: 9px;
  display: flex;
  align-items: center;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 0 13px;
}
.custom:focus-within {
  border-color: var(--green);
}
.custom .pound {
  color: var(--ink-55);
  font-size: 16px;
  font-weight: 600;
}
#custom-amount {
  border: 0;
  outline: 0;
  font: inherit;
  font-size: 16px;
  padding: 12px 8px;
  width: 100%;
}
.per {
  color: var(--ink-55);
  font-size: 14px;
  white-space: nowrap;
}

.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 16px 0 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink);
  cursor: pointer;
}
.check input {
  margin-top: 2px;
  width: 17px;
  height: 17px;
  accent-color: var(--green);
  flex: 0 0 auto;
}

.giftaid {
  margin-top: 16px;
  padding: 14px;
  background: rgba(85, 185, 106, 0.07);
  border: 1px solid rgba(85, 185, 106, 0.3);
  border-radius: 12px;
}
.giftaid .check {
  margin: 0;
}
#giftaid-fields {
  margin-top: 6px;
}

.primary {
  margin-top: 20px;
  width: 100%;
  padding: 15px;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  background: var(--pink);
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 0.12s ease;
}
.primary:hover {
  background: var(--pink-dark);
}
.primary:disabled {
  opacity: 0.7;
  cursor: default;
}

.link {
  border: 0;
  background: none;
  color: var(--pink);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  text-decoration: underline;
}

.summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 15px;
  font-weight: 600;
  color: var(--deep);
  margin-top: 20px;
}

.pay-label {
  margin-top: 20px;
}
#payment-element {
  margin-top: 4px;
  min-height: 44px;
}

.message {
  margin-top: 16px;
  padding: 11px 13px;
  background: #fdecef;
  border: 1px solid #f3c2ce;
  color: var(--pink-dark);
  border-radius: 10px;
  font-size: 14px;
}

#step-result {
  text-align: center;
  padding-top: 6px;
}
.result-icon {
  width: 58px;
  height: 58px;
  margin: 4px auto 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  color: #fff;
}
.result-icon.ok {
  background: var(--green);
}
.result-icon.pending {
  background: #d9a300;
}
#result-title {
  margin: 4px 0;
  color: var(--deep);
}
#result-text {
  color: var(--ink-55);
  font-size: 15px;
  line-height: 1.55;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.foot {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--ink-55);
  font-size: 12.5px;
  line-height: 1.5;
}

/* ---- added 2026-09-24 ---------------------------------------------------- */
/* title + name on one row */
.name-row {
  display: flex;
  gap: 10px;
}
.name-row #title-field {
  flex: 0 0 96px;
}
.name-row .grow {
  flex: 1 1 auto;
}
textarea.input {
  resize: vertical;
  min-height: 60px;
}
.tribute-fields {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 8px;
  margin-top: 10px;
}
.qgroup {
  margin: 14px 0;
}
.qgroup .check {
  margin: 8px 0 0;
}

/* "make it monthly?" prompt (B2) */
.upsell {
  margin-top: 18px;
  padding: 18px;
  border: 1.5px solid var(--green);
  border-radius: 14px;
  background: rgba(85, 185, 106, 0.07);
  text-align: center;
}
.upsell-title {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 800;
  color: var(--deep);
}
.upsell-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-55);
}
.upsell .primary {
  margin-top: 14px;
}
.upsell-no {
  margin-top: 10px;
  font-size: 13.5px;
}

/* express checkout (B1) */
#express-box {
  margin-top: 18px;
}
.or-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 2px;
  color: var(--ink-55);
  font-size: 12.5px;
}
.or-line::before,
.or-line::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

#turnstile-box {
  margin-top: 12px;
}
.privacy {
  margin: 10px 0 0;
  text-align: center;
  font-size: 12px;
  color: var(--ink-55);
  line-height: 1.5;
}
.privacy a,
#manage-link {
  color: var(--pink);
}
#manage-link {
  display: block;
  margin-top: 10px;
  font-size: 14px;
}

/* inside the website pop-up (A3): the pop-up supplies the frame, so drop the page chrome */
body.embedded {
  padding: 0;
  background: #fff;
  min-height: 0;
}
body.embedded .card {
  max-width: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 22px 22px 16px;
}
body.embedded .logo {
  height: 38px;
}

@media (max-width: 420px) {
  .card {
    padding: 22px 18px 18px;
  }
  .tribute-fields {
    grid-template-columns: 1fr;
  }
  .amounts {
    grid-template-columns: repeat(3, 1fr);
  }
}
