/* The donate page (templates/donate.html): why to give on the left, the donation box on the right.
   Built on the site's tokens from style.css, so it follows the light and dark theme. */

.dn {
  padding: clamp(36px, 6vw, 72px) 24px clamp(56px, 8vw, 96px);
  background:
    radial-gradient(ellipse 60% 50% at 85% 0%, var(--accent-soft), transparent 70%),
    radial-gradient(ellipse 40% 40% at 0% 100%, rgba(255, 210, 63, .06), transparent 70%);
}
.dn-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
  max-width: 1100px;
  margin: 0 auto;
}

/* ---- why to give ---------------------------------------------------------------------------- */

.dn-title {
  margin: 14px 0 16px;
  font-size: clamp(36px, 5vw, 54px);
  line-height: 1.02;
  letter-spacing: -.035em;
}
.dn-title span {
  background: linear-gradient(90deg, var(--accent), #ff2e7a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.dn-lead { max-width: 34rem; font-size: 16px; line-height: 1.65; }

.dn-goals { display: grid; gap: 12px; margin: 28px 0 0; padding: 0; list-style: none; }
.dn-goals li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-raise);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.dn-goals b { display: block; margin-bottom: 2px; font-size: 14.5px; }
.dn-goals span { font-size: 13.5px; color: var(--muted); }
.dn-goal-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 9px;
}
.dn-goal-icon svg { width: 18px; height: 18px; }
.dn-goals .dn-goal--next {
  background: linear-gradient(100deg, rgba(255, 210, 63, .12), transparent 70%), var(--bg-raise);
  border-color: rgba(255, 210, 63, .4);
}
.dn-goal--next .dn-goal-icon { color: #ffd23f; background: rgba(255, 210, 63, .14); }
.dn-goal--next .dn-goal-icon svg { filter: drop-shadow(0 0 4px rgba(255, 210, 63, .7)); }
html[data-theme="light"] .dn-goal--next .dn-goal-icon { color: #c48a00; }

.dn-crypto { margin-top: 22px; font-size: 13px; color: var(--muted); }
.dn-crypto a { font-weight: 600; color: var(--accent); }
.dn-crypto a:hover { color: var(--accent-2); }

/* ---- the donation box ----------------------------------------------------------------------- */

.dn-box {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  overflow: hidden;
  padding: 28px;
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.dn-box::before {                         /* the accent bar along the top */
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #ff2e7a, #ffd23f);
}

.dn-box [hidden] { display: none !important; }   /* donate.js switches the steps with hidden */
.dn-box fieldset { margin: 0 0 22px; padding: 0; border: 0; min-width: 0; }
.dn-box legend {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 0;
  font-size: 15px;
  font-weight: 700;
}
.dn-box legend b {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  font-size: 12px;
  color: #fff;
  background: var(--accent);
  border-radius: 50%;
}
.dn-box legend small { font-size: 12px; font-weight: 500; color: var(--muted); }

/* the amounts: five presets and a box for any other amount */
.dn-chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.dn-chip { position: relative; display: block; cursor: pointer; }
.dn-chip input[type="radio"] { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.dn-chip-face,
.dn-chip--other {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  background: var(--bg-raise);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  transition: border-color .12s, background .12s, color .12s, box-shadow .12s, transform .06s;
}
.dn-chip:hover .dn-chip-face { border-color: var(--accent-edge); }
.dn-chip input:checked + .dn-chip-face {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.dn-chip input:focus-visible + .dn-chip-face { outline: 2px solid var(--accent); outline-offset: 2px; }
.dn-chip:active .dn-chip-face { transform: scale(.97); }
.dn-chip--other { justify-content: flex-start; gap: 2px; padding: 0 12px; cursor: text; }
.dn-chip--other:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.dn-cur { color: var(--muted); }
.dn-chip--other input {
  width: 100%;
  min-width: 0;
  padding: 0;
  font: inherit;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: none;
}
.dn-chip--other input::placeholder { font-weight: 500; color: var(--muted-2); }

/* the donor's details (the site's .field, plus the phone box it doesn't style) */
.dn-details .field input {
  width: 100%;
  padding: 11px 12px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--ink);
  background: var(--bg-raise);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  outline: none;
  transition: border-color .12s, background .12s, box-shadow .12s;
}
.dn-details .field input::placeholder { color: var(--muted-2); }
.dn-details .field input:focus { background: var(--panel); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.dn-details .field:last-child { margin-bottom: 0; }

.dn-error {
  margin: 0 0 14px;
  padding: 10px 12px;
  font-size: 13px;
  color: var(--danger);
  background: var(--danger-soft);
  border: 1px solid color-mix(in oklab, var(--danger) 35%, transparent);
  border-radius: 8px;
}
.dn-submit { padding: 15px 18px; font-size: 15px; box-shadow: 0 10px 24px -10px var(--accent); }
.dn-submit .icon { width: 16px; height: 16px; }

.dn-secure { display: flex; gap: 10px; margin-top: 16px; font-size: 12px; line-height: 1.55; color: var(--muted); }
.dn-secure svg { flex: none; width: 16px; height: 16px; margin-top: 1px; color: var(--ok); }

/* ---- step 2: the exact total and the secure card page -------------------------------------- */

.dn-step-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}
.dn-step-title { margin: 6px 0 0; font-size: 26px; letter-spacing: -.02em; line-height: 1.15; }
.dn-step-title:focus { outline: none; }
.dn-sum { margin: 20px 0; border: 1px solid var(--line); border-radius: var(--radius); }
.dn-sum div { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line-soft); }
.dn-sum div:last-child { border-bottom: 0; }
.dn-sum dt { color: var(--muted); }
.dn-sum dd { margin: 0; font-weight: 600; text-align: right; }
.dn-sum .dn-sum-total { background: var(--bg-raise-2); border-radius: 0 0 var(--radius) var(--radius); }
.dn-sum .dn-sum-total dt { font-weight: 700; color: var(--ink); }
.dn-sum .dn-sum-total dd { font-size: 17px; font-weight: 800; color: var(--accent); }

.dn-wait {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-2);
  background: var(--info-soft);
  border-radius: var(--radius);
}
.dn-wait .btn-spinner { color: var(--info); }
.dn-back {
  display: block;
  margin: 16px auto 0;
  padding: 4px;
  font: inherit;
  font-size: 12.5px;
  color: var(--muted);
  background: none;
  border: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.dn-back:hover { color: var(--ink); }

/* ---- step 3: thanks, or try again ----------------------------------------------------------- */

.dn-done { text-align: center; }
.dn-heart {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin: 4px auto 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #ff2e7a);
  border-radius: 50%;
  box-shadow: 0 12px 30px -8px #ff2e7a;
  animation: dn-pop .6s cubic-bezier(.2, 1.6, .4, 1) both;
}
.dn-heart svg { width: 34px; height: 34px; }
@keyframes dn-pop { from { transform: scale(.3); opacity: 0; } }
.dn-done p, .dn-failed p { margin: 12px 0 22px; font-size: 14.5px; line-height: 1.6; }
.dn-done-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* ---- phones ----------------------------------------------------------------------------------- */

@media (max-width: 900px) {
  .dn { padding-left: 16px; padding-right: 16px; }
  .dn-inner { grid-template-columns: minmax(0, 1fr); }
  .dn-box { position: static; padding: 22px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .dn-heart { animation: none; }
  .dn-chip-face, .dn-chip--other { transition: none; }
}
