/* ============================================================
   donation.css – Spendenformular Styles
   ============================================================ */

/* ---------- Spendenformular Wrapper ---------- */
.donation-form-wrapper {
  background: #f5f9f6;
  border-radius: 12px;
  padding: 1.75rem;
  border: 1px solid #d4e5d9;
  border-left: 4px solid var(--green);
  box-shadow: 0 2px 8px rgba(13, 92, 46, 0.06);
}

/* ---------- Spenden Header ---------- */
.donation-header {
  text-align: center;
  margin-bottom: 1.25rem;
}

.donation-badge {
  display: inline-block;
  background: linear-gradient(135deg, #c53f3f 0%, #a92f2f 100%);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid #8f2525;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-bottom: 0.65rem;
  box-shadow: 0 4px 10px rgba(169, 47, 47, 0.25);
}

.donation-title {
  font-size: 1.5rem;
  color: var(--green);
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.donation-description {
  font-size: 0.95rem;
  color: var(--gray);
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.donation-description strong {
  color: #b53c3c;
  font-weight: 800;
}

.donation-supporters {
  font-size: 0.85rem;
  color: var(--green);
  font-weight: 600;
}

/* ---------- Spenden Sections ---------- */
.donation-section {
  margin-bottom: 1.5rem;
}

.donation-section-title {
  font-size: 0.75rem;
  color: var(--gray);
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}

/* ---------- Verwendungszweck Display ---------- */
.donation-purpose-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: linear-gradient(135deg, #e8f4ec 0%, #d4e5d9 100%);
  padding: 1rem 1.5rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  border: 2px solid var(--green);
}

.purpose-display-icon {
  font-size: 1.75rem;
}

.purpose-display-label {
  font-size: 0.95rem;
  color: var(--gray);
}

.purpose-display-label strong {
  color: var(--green);
}

.purpose-display-content {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.purpose-display-note {
  margin: 0;
  font-size: 0.95rem;
  color: var(--gray);
  line-height: 1.5;
}

.purpose-display-note strong {
  color: #b63838;
}

.purpose-display-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.purpose-display-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--green);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  border: 1px solid #155634;
}

.purpose-display-cta:hover {
  background: #155634;
}

.purpose-display-supporters {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.96rem;
  color: var(--gray);
  font-weight: 700;
}

.purpose-display-supporters i {
  color: var(--green);
  font-size: 1.2rem;
}

/* ---------- Häufigkeit Grid ---------- */
.donation-frequency-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.frequency-btn {
  padding: 0.875rem 1rem;
  background: white;
  border: 2px solid #d4e5d9;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--black);
  transition: all 0.2s ease;
}

.frequency-btn:hover {
  background: #e8f4ec;
  border-color: var(--green);
}

.frequency-btn.active {
  background: var(--green);
  border-color: var(--green);
  color: white;
}

/* ---------- Betrag Grid ---------- */
.donation-amount-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.amount-btn {
  padding: 1rem;
  background: white;
  border: 2px solid #d4e5d9;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  color: var(--black);
  transition: all 0.2s ease;
}

.amount-btn:hover {
  background: #e8f4ec;
  border-color: var(--green);
}

.amount-btn.active {
  background: var(--green);
  border-color: var(--green);
  color: white;
}

/* Link-Button für "Anderer Betrag" */
.amount-btn-link {
  text-decoration: none;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e8f4ec 0%, #d4e5d9 100%);
  border-color: var(--green);
  color: var(--green);
}

.amount-btn-link:hover {
  background: var(--green);
  color: white;
}

/* Mobile: "Anderer Betrag" - Text nebeneinander, dynamische Breite */
@media (max-width: 600px) {
  .amount-btn-link {
    padding: 0.75rem 0.5rem;
    font-size: 0.8rem;
    white-space: nowrap;
  }
}

/* ---------- Custom Amount Input ---------- */
.donation-custom-amount {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.donation-custom-amount label {
  font-size: 0.9rem;
  color: var(--gray);
  white-space: nowrap;
}

.custom-amount-input {
  position: relative;
  flex: 1;
}

.custom-amount-input input {
  width: 100%;
  padding: 0.75rem 2.5rem 0.75rem 1rem;
  border: 2px solid #d4e5d9;
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s;
}

.custom-amount-input input:focus {
  outline: none;
  border-color: var(--green);
}

.custom-amount-input .currency {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray);
  font-weight: 600;
}

/* ---------- Fee Checkbox ---------- */
.donation-fee-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  padding: 1rem;
  background: #f5f9f6;
  border-radius: 10px;
  transition: background 0.2s;
}

.donation-fee-checkbox:hover {
  background: #e8f4ec;
}

.donation-fee-checkbox input {
  display: none;
}

.donation-fee-checkbox .checkmark {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border: 2px solid #d4e5d9;
  border-radius: 6px;
  background: white;
  position: relative;
  transition: all 0.2s;
}

.donation-fee-checkbox input:checked + .checkmark {
  background: var(--green);
  border-color: var(--green);
}

.donation-fee-checkbox input:checked + .checkmark::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 14px;
  font-weight: bold;
}

.fee-label {
  font-size: 0.9rem;
  color: var(--gray);
  line-height: 1.5;
}

.fee-label .fee-amount {
  color: var(--green);
  font-weight: 600;
}

/* ---------- Summary ---------- */
.donation-summary {
  background: white;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  border: 1px solid #d4e5d9;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  font-size: 0.95rem;
  color: var(--gray);
}

.summary-row.total {
  border-top: 2px solid #d4e5d9;
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--black);
}

.summary-row.total .summary-value {
  color: var(--green);
}

/* ---------- Payment Methods Display ---------- */
.payment-methods-display {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem;
  background: linear-gradient(135deg, #e8f4ec 0%, #d4e5d9 100%);
  border-radius: 12px;
  border: 2px solid var(--green);
}

.payment-method {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.payment-logo {
  width: 40px;
  height: 28px;
  object-fit: contain;
}

/* ---------- Payment Grid ---------- */
.donation-payment-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.payment-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.25rem 1rem;
  background: #f5f9f6;
  border: 2px solid #d4e5d9;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.payment-btn:hover {
  background: #e8f4ec;
  border-color: var(--green);
}

.payment-btn.active {
  background: var(--green);
  border-color: var(--green);
}

.payment-btn.active .payment-icon,
.payment-btn.active .payment-label {
  color: white;
}

.payment-icon {
  font-size: 1.75rem;
}

.payment-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--black);
  text-align: center;
}

/* ---------- Submit Button ---------- */
.donation-submit-btn {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(135deg, var(--green) 0%, var(--green-light) 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(13, 92, 46, 0.3);
}

.donation-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(13, 92, 46, 0.4);
}

.donation-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ---------- Footer ---------- */
.donation-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.8rem;
  font-size: 0.8rem;
  color: var(--gray);
  flex-wrap: wrap;
}

/* ---------- Custom Amount Wrapper ---------- */
.donation-custom-wrapper {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px dashed #d4e5d9;
}

/* ---------- Custom Amount Form ---------- */
.donation-custom-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ---------- Custom Amount Input ---------- */
.donation-custom-form .custom-amount-input {
  position: relative;
}

.donation-custom-form .custom-amount-input input {
  width: 100%;
  padding: 1rem 3rem 1rem 1rem;
  border: 2px solid #d4e5d9;
  border-radius: 10px;
  font-size: 1.1rem;
  font-family: inherit;
  transition: border-color 0.2s;
}

.donation-custom-form .custom-amount-input input:focus {
  outline: none;
  border-color: var(--green);
}

.donation-custom-form .custom-amount-input input::placeholder {
  color: #999;
}

.donation-custom-form .custom-amount-input .currency {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray);
  font-weight: 600;
  font-size: 1.1rem;
}

/* ---------- Custom Submit Button ---------- */
.custom-submit {
  margin-top: 0.5rem;
}

/* ---------- Hint Text ---------- */
.donation-hint {
  text-align: center;
  font-size: 0.85rem;
  color: var(--gray);
  margin: 0;
}

/* ---------- Loading Indicator ---------- */
.donation-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem;
  background: #e8f4ec;
  border-radius: 10px;
  color: var(--green);
  font-weight: 600;
}

.loading-spinner {
  width: 20px;
  height: 20px;
  border: 3px solid #d4e5d9;
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ---------- Error Message ---------- */
.donation-error {
  padding: 1rem;
  background: #fee2e2;
  border: 1px solid #fca5a5;
  border-radius: 10px;
  color: #b91c1c;
  font-size: 0.9rem;
  text-align: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  .donation-form-wrapper {
    padding: 1.25rem;
  }

  .donation-title {
    font-size: 1.25rem;
  }

  .donation-description {
    font-size: 0.9rem;
  }

  .donation-purpose-display {
    flex-direction: column;
    text-align: center;
    padding: 1rem;
  }

  .purpose-display-icon {
    font-size: 1.5rem;
  }

  .purpose-display-label {
    font-size: 0.85rem;
  }

  .purpose-display-note {
    font-size: 0.88rem;
  }

  .purpose-display-actions {
    justify-content: center;
    gap: 0.5rem;
  }

  .purpose-display-supporters {
    font-size: 0.88rem;
  }

  .donation-amount-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
  }

  .amount-btn {
    padding: 0.75rem 0.5rem;
    font-size: 0.9rem;
  }

  .donation-frequency-grid,
  .donation-payment-grid {
    grid-template-columns: 1fr;
  }

  .donation-custom-amount {
    flex-direction: column;
    align-items: stretch;
  }

  .donation-custom-amount label {
    white-space: normal;
  }

  .donation-footer {
    flex-direction: column;
    gap: 0.25rem;
  }

  .donation-submit-btn {
    font-size: 1rem;
    padding: 0.875rem;
  }

  .summary-row {
    font-size: 0.9rem;
  }

  .summary-row.total {
    font-size: 1rem;
  }
}
