/**
 * Donate Form styles — public side.
 * Loaded on form.html (lazy-loaded via media="print" trick same as
 * ticket-buyer.css). Takes visual effect only when donate-form.js
 * activates the .donate-form container (fundraising.enabled === true).
 *
 * Inherits the host's chosen themeColor via the same CSS vars form.js
 * already sets on :root (--primary-color, --secondary-color).
 */

/* ============================================================
   Goal thermometer
   ============================================================ */
.donate-thermo {
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  padding: 1.1rem 1.25rem;
  margin: 1rem 0 1.25rem;
}
.donate-thermo-stats {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
  flex-wrap: wrap;
}
.donate-thermo-raised {
  font-size: 1.05rem;
  color: var(--text-color, #2a2a2a);
}
.donate-thermo-raised strong {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary-color, #2a2a2a);
}
.donate-thermo-goal {
  color: #6a6a6a;
  font-weight: 500;
}
.donate-thermo-donors {
  font-size: 0.92rem;
  color: #6a6a6a;
  font-variant-numeric: tabular-nums;
}
.donate-thermo-bar {
  position: relative;
  height: 12px;
  background: rgba(0, 0, 0, 0.07);
  border-radius: 999px;
  overflow: hidden;
}
.donate-thermo-fill {
  position: absolute;
  inset: 0;
  width: 0%;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--primary-color, #b8964e) 70%, #fff),
    var(--primary-color, #b8964e));
  transition: width 0.4s ease-out;
}
.donate-thermo-mark {
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 2px;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 1px;
}
.donate-thermo-bonus {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #6a6a6a;
}
.donate-thermo-bonus strong {
  color: var(--text-color, #2a2a2a);
  font-weight: 600;
}

/* ============================================================
   Donate card
   ============================================================ */
.donate-form {
  margin: 1.5rem 0;
  font-family: inherit;
}
.donate-card {
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  padding: 1.4rem;
}
.donate-header h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
  color: var(--text-color, #2a2a2a);
}
.donate-subtle {
  color: #6a6a6a;
  font-size: 0.95rem;
  margin: 0 0 1rem;
}

/* Amount picker */
.donate-amounts {
  margin: 0.5rem 0 1.2rem;
}
.donate-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-color, #2a2a2a);
  margin-bottom: 0.45rem;
}
.donate-amount-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}
.donate-amount-btn {
  background: #fff;
  border: 1.5px solid rgba(0, 0, 0, 0.12);
  color: var(--text-color, #2a2a2a);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.7rem 0.5rem;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.08s;
  font-family: inherit;
}
.donate-amount-btn:hover {
  border-color: var(--primary-color, #888);
}
.donate-amount-btn.active {
  background: var(--primary-color, #b8964e);
  border-color: var(--primary-color, #b8964e);
  color: #fff;
}
.donate-custom-row {
  position: relative;
  display: flex;
  align-items: center;
  background: #fff;
  border: 1.5px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  padding: 0 0 0 0.85rem;
}
.donate-custom-row:focus-within {
  border-color: var(--primary-color, #888);
}
.donate-custom-prefix {
  font-weight: 600;
  color: #6a6a6a;
  margin-right: 0.4rem;
}
.donate-custom-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 0.7rem 0.5rem 0.7rem 0;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text-color, #2a2a2a);
}

/* Donor info */
.donate-info {
  display: grid;
  gap: 0.85rem;
  margin: 0.5rem 0 0.75rem;
}
.donate-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.55rem;
}
.donate-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-color, #2a2a2a);
}
.donate-field label small {
  color: #888;
  font-weight: 400;
}
.donate-field input,
.donate-field textarea,
.donate-select {
  background: #fff;
  border: 1.5px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text-color, #2a2a2a);
  width: 100%;
  transition: border-color 0.15s;
}
.donate-field input:focus,
.donate-field textarea:focus,
.donate-select:focus {
  outline: none;
  border-color: var(--primary-color, #888);
}
.donate-field small {
  font-size: 0.78rem;
  color: #888;
}

/* Toggles */
.donate-toggles {
  margin-top: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.donate-toggle {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.9rem;
  color: var(--text-color, #2a2a2a);
  cursor: pointer;
  line-height: 1.4;
}
.donate-toggle input {
  margin-top: 3px;
}
.donate-frequency-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.3rem;
  padding-left: 1.6rem;
}
.donate-frequency-row label {
  font-size: 0.85rem;
  color: #555;
  margin: 0;
}
.donate-frequency-row .donate-select {
  width: auto;
  flex: 0 0 auto;
}

/* Gift Aid declaration (UK donations) */
.donate-giftaid {
  margin: 0.85rem 0 0.25rem;
  padding: 0.85rem 1rem;
  background: rgba(107, 142, 78, 0.06);
  border: 1px solid rgba(107, 142, 78, 0.25);
  border-radius: 10px;
}
.donate-giftaid .donate-toggle {
  margin: 0 0 0.45rem;
  font-size: 0.95rem;
}
.donate-giftaid-text {
  font-size: 0.78rem;
  color: #5a6a4a;
  line-height: 1.5;
  padding-left: 1.65rem;
}

/* Submit button */
.donate-submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  margin: 1rem 0 0;
  padding: 0.85rem 1.4rem;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--primary-color, #b8964e) 85%, #000),
    var(--primary-color, #b8964e));
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.15s, filter 0.15s;
}
.donate-submit-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}
.donate-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
/* Children inherit pointer-events: none so taps on the icon or the
   text both register on the button itself. */
.donate-submit-btn > * { pointer-events: none; }

/* ============================================================
   Modal mode — donate-form rendered in a Bootstrap modal.
   The modal frame itself uses Bootstrap defaults; we just
   tighten the padding inside and let the donate-form CSS
   above handle its own styling.
   ============================================================ */
.donate-modal .modal-content {
  background: #ffffff;
  color: var(--text-color, #2a2a2a);
  border: none;
  border-radius: 14px;
  overflow: hidden;
}
.donate-modal-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  padding: 1.1rem 1.4rem;
}
.donate-modal-header .modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-color, #2a2a2a);
}
.donate-modal .modal-body {
  padding: 1.25rem 1.4rem 1.5rem;
}
/* Inside the modal, drop the donate-card frame — the modal already
   provides the container. Keeps the form from looking double-boxed. */
.donate-form-in-modal .donate-card {
  background: transparent;
  border: none;
  padding: 0;
}

/* ============================================================
   Donor wall — recent donations beneath the donate form
   ============================================================ */
.donate-wall {
  margin: 1.25rem 0 0;
  padding: 1.1rem 1.25rem;
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
}
.donate-wall-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.6rem;
  color: var(--text-color, #2a2a2a);
}
.donate-wall-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.donate-wall-row {
  padding: 0.55rem 0;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}
.donate-wall-row:first-child {
  border-top: none;
  padding-top: 0;
}
.donate-wall-row-line {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: baseline;
}
.donate-wall-name {
  font-weight: 600;
  color: var(--text-color, #2a2a2a);
}
.donate-wall-amount {
  font-weight: 700;
  color: var(--primary-color, #b8964e);
  font-variant-numeric: tabular-nums;
}
.donate-wall-dedication {
  font-size: 0.85rem;
  color: #6a6a6a;
  font-style: italic;
  margin-top: 0.15rem;
}
.donate-wall-comment {
  font-size: 0.88rem;
  color: #555;
  margin-top: 0.25rem;
  line-height: 1.4;
}

/* Mobile tightening */
@media (max-width: 540px) {
  .donate-card { padding: 1.1rem; }
  .donate-thermo { padding: 0.9rem 1rem; }
  .donate-thermo-raised strong { font-size: 1.2rem; }
}
