/**
 * FC Stripe Donate block styles.
 * Mirrors the amount-button grid and frequency toggle from the existing
 * iframe-based form so the two look identical.
 */

.fc-stripe-donate-form {
  --fc-donate-ink: #222222;
  --fc-donate-muted: #4a4a4a;
  --fc-donate-border: #8a8a8a;
  --fc-donate-accent: #ffe300;
  --fc-donate-bg: #ffffff;
  --fc-donate-soft: #d9d9d9;
  font-family: inherit;
  max-width: 1000px;
  margin: 0 auto;
  padding: clamp(14px, 2.2vw, 24px);
  background: transparent;
  color: var(--fc-donate-ink);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  box-sizing: border-box;
}

.fc-stripe-donate-section {
  background-size: var(--fc-donate-bg-size) !important;
}

/* Heading styles removed — the form no longer renders its own heading;
   the surrounding context (DXPR section, block region, etc.) is now
   responsible for any title text above the form. */

/* ── Frequency toggle ─────────────────────────────────────────────────── */
.fc-donate-frequency {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  margin: 0 0 0.8rem;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.fc-frequency-option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  cursor: pointer;
  margin: 0;
  padding: 0;
  border-radius: 0;
  color: var(--fc-donate-ink);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1;
  text-transform: none;
  letter-spacing: 0;
  transition: background 0.15s ease, color 0.15s ease;
}

.fc-frequency-option input {
  position: static;
  width: 17px;
  height: 17px;
  margin: 0 0.35rem 0 0;
  opacity: 1;
  pointer-events: auto;
  accent-color: var(--fc-donate-accent);
}

.fc-frequency-option span {
  display: inline;
  width: auto;
  padding: 0;
  border-radius: 0;
  text-align: left;
}

.fc-frequency-option input:checked + span {
  background: transparent;
  box-shadow: none;
}

/* ── Amount buttons ───────────────────────────────────────────────────── */
.fc-donate-amounts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 0.7rem;
}

/* "Other amount" spans the last 2 columns */
.fc-amount-other-btn {
  grid-column: span 2;
}

.fc-amount-btn {
  display: block;
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  text-align: center;
  border: 2px solid var(--fc-donate-border);
  border-radius: 0;
  background: #fff;
  color: var(--fc-donate-ink);
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  font-weight: 500;
  cursor: pointer;
  box-shadow: none;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.fc-amount-btn.selected {
  background: var(--fc-donate-accent);
  border-color: var(--fc-donate-border);
  transform: none;
  box-shadow: none;
}

.fc-amount-btn:hover:not(.selected) {
  background: #eeeeee;
  transform: none;
  box-shadow: none;
}

/* ── Other amount input ───────────────────────────────────────────────── */
.fc-donate-other-amount {
  margin-bottom: 0.7rem;
}

.fc-amount-other-input {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid var(--fc-donate-border);
  border-radius: 0;
  font-size: 1.05rem;
  box-sizing: border-box;
}

.fc-donate-reveal,
.fc-donate-submit {
  display: block;
  width: 100%;
  min-height: 46px;
  padding: 11px 16px;
  background: var(--fc-donate-soft);
  color: var(--fc-donate-ink);
  border: 0;
  border-radius: 9px;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.fc-donate-reveal {
  margin-top: 0.9rem;
}

.fc-donate-reveal:hover,
.fc-donate-submit:hover:not(:disabled) {
  background: #cfcfcf;
  color: var(--fc-donate-ink);
  transform: none;
}

.fc-donate-details {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #d6d6d6;
  animation: fcDonateReveal 0.28s ease both;
}

/* Full-form mode renders the details visible on load, so the reveal animation
   must not run: its transient translateY transform flashed the scrollbar and
   could lock page scrolling on first paint. */
.fc-donate-details.fc-donate-details--static {
  animation: none;
}

@keyframes fcDonateReveal {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Donor fields ─────────────────────────────────────────────────────── */
.fc-donate-fields {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 0.95rem;
}

.fc-donate-field-row {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.fc-donate-field-row input {
  display: block;
  width: 100%;
}

.fc-donate-fields input,
.fc-donate-field-row input,
.fc-donate-fields textarea {
  flex: 1;
  padding: 10px 12px;
  border: 2px solid var(--fc-donate-border);
  border-radius: 0;
  font-size: 1rem;
  box-sizing: border-box;
  background: #fff;
  color: var(--fc-donate-ink);
}

.fc-donate-fields input:focus,
.fc-donate-field-row input:focus,
.fc-donate-fields textarea:focus,
.fc-amount-other-input:focus {
  border-color: var(--fc-donate-border);
  outline: 2px solid rgba(255, 227, 0, 0.75);
  outline-offset: 1px;
}

.fc-donate-fields textarea {
  min-height: 90px;
  resize: vertical;
}

.fc-donate-check {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.25rem 0;
  color: var(--fc-donate-muted);
  font-size: 1rem;
  font-weight: 400;
}

.fc-donate-check input {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  accent-color: var(--fc-donate-accent);
}

.fc-donate-honoree-fields {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.8rem;
  border: 1px solid #d8d8d8;
  border-radius: 0;
  background: #f5f5f5;
}

/* ── Stripe Payment Element ───────────────────────────────────────────── */
#fc-stripe-payment-element {
  margin-bottom: 0.9rem;
}

/* ── Error message ────────────────────────────────────────────────────── */
.fc-stripe-error {
  color: #c0392b;
  background: #fdf0ef;
  border: 1px solid #e74c3c;
  border-radius: 0;
  padding: 0.7rem 0.85rem;
  margin: 0.8rem 0;
  font-size: 0.9rem;
  font-weight: 600;
}

/* ── Submit button ────────────────────────────────────────────────────── */
.fc-donate-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

@media (max-width: 640px) {
  .fc-stripe-donate-form {
    padding: 14px;
  }

  .fc-donate-amounts {
    grid-template-columns: repeat(2, 1fr);
  }

  .fc-amount-other-btn {
    grid-column: span 2;
  }

  .fc-donate-field-row {
    flex-direction: column;
  }

  .fc-donate-frequency {
    width: 100%;
  }
}
