html, body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(to right, #FFD54F, #FF8A65);
  font-family: 'Poppins', Arial, sans-serif;
  max-width: 100%;
  overflow-x: hidden;
}

img, iframe, video {
  max-width: 100%;
}

.donation-box {
  background: #fffaf0;
  padding: 36px;
  border-radius: 18px;
  width: 420px;
  max-width: calc(100% - 32px);
  margin: 40px auto;
  box-shadow: 0px 10px 30px rgba(0,0,0,0.25);
  box-sizing: border-box;
}

/* ------------------ Mobile ------------------ */
@media (max-width: 480px) {
  .donation-box {
    padding: 24px 20px;
    margin: 20px auto;
  }

  .seva-header h2 {
    font-size: 22px;
  }

  .section-title {
    font-size: 18px;
    margin: 22px 0 12px;
  }

  .amount-options {
    flex-wrap: wrap;
  }
  .amount-options button {
    flex: 1 1 calc(50% - 5px);
    padding: 10px 4px;
    font-size: 14px;
  }

  .seva-options {
    flex-direction: column;
    gap: 10px;
  }
}

/* Header */
.seva-header {
  text-align: center;
  margin-bottom: 32px;
}

.mantra {
  font-size: 18px;
  color: #b35400;
}

.seva-header h2 {
  margin: 8px 0;
  color: #8b2e00;
}

.subtitle {
  font-size: 14px;
  color: #5a3e2b;
}

/* Section titles */
.section-title {
  font-size: 20px;
  font-weight: 600;
  color: #8b2e00;
  margin: 28px 0 14px;
}

/* Inputs */
/* Text-style fields only. Radios/checkboxes must be excluded, or they
   inherit width:100% and stretch to fill their flex parent (Safari also
   applies the padding, which is what broke the seva cards on iOS). */
.donation-box input:not([type="radio"]):not([type="checkbox"]),
.donation-box select {
  width: 100%;
  padding: 14px;
  margin: 10px 0;
  border-radius: 10px;
  border: 1px solid #ccc;
  box-sizing: border-box;
}

/* Anonymous Donation */
.anonymous-row {
  margin: 18px 0 6px;
}

.anonymous-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-size: 14px;
  color: #5a3e2b;
}

.anonymous-toggle input {
  display: none;
}

.custom-check {
  width: 18px;
  height: 18px;
  border: 2px solid #f39c12;
  border-radius: 4px;
  position: relative;
}

.anonymous-toggle input:checked + .custom-check::after {
  content: "✓";
  position: absolute;
  top: -2px;
  left: 3px;
  font-size: 16px;
  color: #e67e22;
  font-weight: bold;
}

/* Seva Section */
.seva-options {
  display: flex;
  gap: 16px;
}

.seva-card {
  flex: 1;
  background: #fff6e5;
  border: 2px solid #f0c36d;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}

.seva-card input[type="radio"] {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  margin: 2px 0 0;
  padding: 0;
  accent-color: #e67e22;
}

.seva-card > span {
  flex: 1;
  min-width: 0;
}

.seva-card strong {
  display: block;
  color: #8b2e00;
  font-size: 15px;
}

.seva-card small {
  display: block;
  color: #5a3e2b;
  font-size: 12px;
  margin-top: 2px;
}

/* Payment Section */
.payment-section {
  margin-top: 8px;
}

/* Offering */
.amount-options {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.amount-options button {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #f39c12;
  background: #fff;
  cursor: pointer;
}

/* Payment Cards */
.donation-card {
  background: #fffaf0;
  border: 2px dashed #f39c12;
  border-radius: 12px;
  padding: 20px;
  margin-top: 16px;
  text-align: center;
  transition: all 0.3s ease;
}

.hidden {
  display: none !important;
}

/* CTA */
.primary-cta {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #f39c12, #e67e22);
  border: none;
  border-radius: 14px;
  color: white;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  margin-top: 22px;
}

/* Trust Note */
.secure-note {
  margin-top: 16px;
  font-size: 13px;
  text-align: center;
  color: #5a3e2b;
}

/* ------------------ Message Box + Spinner ------------------ */
#messageBox {
  margin-top: 18px;
  text-align: center;
  font-size: 15px;
  color: #5a3e2b;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 3px solid #f0c36d;
  border-top-color: #C58C3D;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ------------------ Thank-you Modal ------------------ */
.thankyou-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.thankyou-box {
  background: #fffaf0;
  padding: 36px 28px;
  border-radius: 18px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  animation: thankyou-pop 0.35s ease-out;
}

@keyframes thankyou-pop {
  from { transform: scale(0.85); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

.thankyou-box .mantra {
  font-size: 18px;
  color: #b35400;
  margin-bottom: 8px;
}

.thankyou-box h2 {
  margin: 4px 0 14px;
  color: #8b2e00;
  font-size: 24px;
}

.thankyou-box .thankyou-amount {
  font-size: 22px;
  font-weight: 700;
  color: #C58C3D;
  margin: 10px 0 18px;
}

.thankyou-box .thankyou-message {
  font-size: 14px;
  color: #5a3e2b;
  line-height: 1.6;
  margin-bottom: 24px;
}

.thankyou-box button {
  padding: 12px 28px;
  background: linear-gradient(135deg, #f39c12, #e67e22);
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  font-size: 15px;
}

.thankyou-box button:hover {
  opacity: 0.9;
}
