/* ==========================================================================
   Online Contribution Form Styling - Perfect Responsive Design
   ========================================================================== */

.contribution-wrapper {
  max-width: 680px;
  width: 100%;
  margin: 0 auto 40px auto;
  background: #ffffff;
  border: 1px solid #fed7aa;
  border-radius: 18px;
  box-shadow: 0 10px 25px -5px rgba(234, 88, 12, 0.08), 0 8px 16px -6px rgba(0, 0, 0, 0.03);
  overflow: hidden;
  box-sizing: border-box;
}

.contribution-header-bar {
  background: linear-gradient(135deg, #fdf8f0 0%, #fff7ed 100%);
  padding: 24px 28px 18px 28px;
  border-bottom: 1px solid #fed7aa;
  box-sizing: border-box;
  width: 100%;
}

.contribution-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #c2410c;
  margin-bottom: 6px;
}

.contribution-header-bar h3 {
  font-size: 1.45rem;
  font-weight: 800;
  color: #1e293b;
  margin: 0 0 4px 0;
  letter-spacing: -0.01em;
}

.contribution-header-bar p {
  font-size: 0.88rem;
  color: #64748b;
  margin: 0;
  line-height: 1.45;
}

.contribution-body {
  padding: 28px;
  box-sizing: border-box;
}

/* Contribution Cause Select Option */
.cause-select-group {
  margin-bottom: 20px;
}

.cause-select-group label {
  display: flex;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 800;
  color: #1e293b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.cause-input-group {
  background: #fffaf5;
  border: 1.5px solid #fed7aa;
  border-radius: 12px;
  padding: 0 14px;
  min-height: 48px;
  transition: all 0.2s ease;
  box-sizing: border-box;
  display: flex;
  align-items: center;
}

.cause-input-group:focus-within {
  border-color: #ea580c;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.15);
}

.cause-input-group svg {
  color: #ea580c;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-right: 10px;
}

.cause-input-group select {
  font-size: 0.95rem;
  font-weight: 600;
  color: #0f172a;
  padding: 12px 0;
  cursor: pointer;
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
}

.cause-input-group select:invalid,
.cause-input-group select option[value=""] {
  color: #64748b;
  font-weight: normal;
}

.cause-input-group select option {
  color: #0f172a;
  font-weight: 500;
  padding: 8px 12px;
  background: #ffffff;
}

/* Help cards click cue */
.help-grid .help-card {
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.help-grid .help-card:hover {
  transform: translateY(-3px);
  border-color: #ea580c;
}

/* Amount Container (Top Display Box) */
.amount-display-card {
  border: 2px solid #ea580c;
  border-radius: 14px;
  padding: 16px 20px;
  background: #ffffff;
  position: relative;
  margin-bottom: 18px;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.08);
  box-sizing: border-box;
}

.amount-card-label {
  font-size: 0.74rem;
  font-weight: 800;
  color: #ea580c;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 6px;
}

.amount-input-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.amount-input-wrapper {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.amount-currency-sym {
  font-size: 2rem;
  font-weight: 800;
  color: #0f172a;
  margin-right: 8px;
  line-height: 1;
  user-select: none;
}

.amount-number-input {
  border: none;
  outline: none;
  font-size: 2.2rem;
  font-weight: 800;
  color: #0f172a;
  width: 100%;
  min-width: 0;
  background: transparent;
  padding: 0;
  font-family: inherit;
  line-height: 1;
}

/* Remove number input spinners */
.amount-number-input::-webkit-outer-spin-button,
.amount-number-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.amount-number-input[type=number] {
  -moz-appearance: textfield;
}

.inr-badge {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 6px;
  letter-spacing: 0.5px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Quick Amount Buttons (Pills) - 5 columns for perfect 2 rows of 5 */
.amount-pills-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

.amount-pill-btn {
  background: #fdfaf6;
  border: 1px solid #fed7aa;
  color: #44403c;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 10px 4px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
  white-space: nowrap;
  box-sizing: border-box;
}

.amount-pill-btn:hover {
  background: #fff7ed;
  border-color: #f97316;
  color: #ea580c;
}

.amount-pill-btn.active {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  border-color: #ea580c;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.35);
}

/* Notice Banner */
.notice-80g-box {
  background: #fffbeb;
  border: 1px solid #fef3c7;
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  box-sizing: border-box;
}

.notice-80g-box svg {
  color: #d97706;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

.notice-80g-text {
  font-size: 0.82rem;
  color: #92400e;
  font-weight: 500;
  margin: 0;
  line-height: 1.35;
}

/* Section Headings */
.form-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 800;
  color: #1e293b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
}

.form-section-title svg {
  width: 17px;
  height: 17px;
  color: #ea580c;
  flex-shrink: 0;
}

/* Form Fields */
.form-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.form-group-custom {
  margin-bottom: 14px;
}

.form-group-custom label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 6px;
}

.form-group-custom label span.required {
  color: #ef4444;
}

.form-group-custom label span.optional {
  color: #94a3b8;
  font-weight: normal;
  font-size: 0.76rem;
}

.input-icon-group {
  display: flex;
  align-items: center;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  padding: 0 12px;
  transition: all 0.2s ease;
  box-sizing: border-box;
  min-height: 44px;
}

.input-icon-group:focus-within {
  border-color: #ea580c;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.15);
}

.input-icon-group svg {
  color: #94a3b8;
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  margin-right: 10px;
}

.input-icon-group .phone-prefix {
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
  padding-right: 8px;
  border-right: 1px solid #cbd5e1;
  margin-right: 10px;
  white-space: nowrap;
}

.input-icon-group input,
.input-icon-group select {
  border: none;
  outline: none;
  background: transparent;
  width: 100%;
  padding: 11px 0;
  font-size: 0.92rem;
  color: #0f172a;
  font-family: inherit;
}

.input-icon-group select {
  cursor: pointer;
}

.input-icon-group input::placeholder {
  color: #94a3b8;
}

/* Submit Action Button */
.btn-contribute-submit {
  width: 100%;
  background: linear-gradient(to right, #f97316, #d97706);
  color: #ffffff;
  font-size: 1.02rem;
  font-weight: 800;
  padding: 15px 16px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 6px 16px rgba(249, 115, 22, 0.35);
  transition: all 0.2s ease;
  margin-top: 12px;
  box-sizing: border-box;
}

.btn-contribute-submit:hover {
  background: linear-gradient(to right, #ea580c, #b45309);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(234, 88, 12, 0.45);
}

.btn-contribute-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.btn-contribute-submit svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn-amt-nowrap {
  white-space: nowrap;
  font-weight: 800;
}

.gateway-assurance {
  text-align: center;
  font-size: 0.74rem;
  color: #64748b;
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  line-height: 1.4;
  padding: 0 4px;
}

.gateway-assurance svg {
  width: 14px;
  height: 14px;
  min-width: 14px;
  flex-shrink: 0;
  color: #10b981;
}

/* Modal Popup Receipt on Frontend */
.receipt-modal-backdrop {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.receipt-modal-backdrop.active {
  display: flex;
}

/* ==========================================================================
   Comprehensive Mobile & Tablet Responsiveness
   ========================================================================== */

/* Tablets / Mobile Screens (<= 640px) */
@media (max-width: 640px) {
  .contribution-wrapper {
    margin: 0 auto 30px auto;
    border-radius: 14px;
  }

  .contribution-header-bar {
    padding: 20px 18px 14px 18px;
  }

  .contribution-header-bar h3 {
    font-size: 1.25rem;
  }

  .contribution-header-bar p {
    font-size: 0.82rem;
  }

  .contribution-body {
    padding: 18px 16px;
  }

  /* Form row stacks to single column */
  .form-row-2col {
    grid-template-columns: 1fr;
    gap: 0;
    margin-bottom: 0;
  }

  .form-group-custom {
    margin-bottom: 12px;
  }

  /* Keep inputs at 16px to prevent iOS Safari auto-zoom */
  .input-icon-group input,
  .input-icon-group select {
    font-size: 16px;
  }

  /* Amount Display Card */
  .amount-display-card {
    padding: 12px 14px;
    border-radius: 12px;
    margin-bottom: 14px;
  }

  .amount-currency-sym {
    font-size: 1.65rem;
    margin-right: 4px;
  }

  .amount-number-input {
    font-size: 1.75rem;
  }

  .inr-badge {
    font-size: 0.7rem;
    padding: 3px 8px;
  }

  /* Pills Grid: 5 columns down to mobile */
  .amount-pills-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    margin-bottom: 16px;
  }

  .amount-pill-btn {
    font-size: 0.78rem;
    padding: 8px 1px;
    border-radius: 8px;
    letter-spacing: -0.2px;
  }

  /* Submit Button: Scales gracefully, never breaks amount */
  .btn-contribute-submit {
    padding: 13px 10px;
    font-size: clamp(0.85rem, 3.6vw, 0.98rem);
    gap: 6px;
    border-radius: 10px;
  }

  .btn-contribute-submit svg {
    width: 17px;
    height: 17px;
  }

  .gateway-assurance {
    font-size: 0.71rem;
    gap: 5px;
  }
}

/* Small mobile devices (<= 360px) */
@media (max-width: 360px) {
  .contribution-body {
    padding: 14px 12px;
  }

  .amount-pills-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
  }

  .amount-pill-btn {
    font-size: 0.72rem;
    padding: 7px 0;
  }

  .btn-contribute-submit {
    font-size: 0.84rem;
    padding: 12px 8px;
  }
}

/* ==========================================================================
   Inline Error / Warning Banner
   ========================================================================== */

.contrib-error-banner {
  display: none;
  align-items: flex-start;
  gap: 10px;
  background: #fef2f2;
  border: 1.5px solid #fca5a5;
  border-left: 4px solid #ef4444;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
  animation: bannerSlideIn 0.25s ease;
  box-sizing: border-box;
}

.contrib-error-banner.is-warning {
  background: #fffbeb;
  border-color: #fcd34d;
  border-left-color: #f59e0b;
}

.contrib-error-banner svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: #ef4444;
  margin-top: 1px;
}

.contrib-error-banner.is-warning svg {
  color: #d97706;
}

.contrib-error-banner span {
  font-size: 0.84rem;
  font-weight: 600;
  color: #991b1b;
  line-height: 1.45;
}

.contrib-error-banner.is-warning span {
  color: #92400e;
}

@keyframes bannerSlideIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
