/* NGO Trust Donations — Public Styles */
:root {
  --ntd-green: #2d7a3a;
  --ntd-green-light: #e8f5e9;
  --ntd-green-hover: #1f5929;
  --ntd-radius: 10px;
  --ntd-shadow: 0 4px 20px rgba(0,0,0,.10);
}

/* ── Donation Form ─────────────────────────────────────────────────────── */
.ntd-form-wrap {
  max-width: 600px;
  margin: 30px auto;
  background: #fff;
  border-radius: var(--ntd-radius);
  box-shadow: var(--ntd-shadow);
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.ntd-form-title {
  background: var(--ntd-green);
  color: #fff;
  margin: 0;
  padding: 22px 30px;
  font-size: 22px;
  letter-spacing: .5px;
}

/* Steps */
.ntd-step { padding: 28px 30px; display: none; }
.ntd-step.ntd-step-active { display: block; }

.ntd-step-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  margin: 0 0 20px;
  color: #333;
}
.ntd-step-num {
  background: var(--ntd-green);
  color: #fff;
  width: 28px; height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

/* Amount buttons */
.ntd-amount-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.ntd-amount-btn {
  padding: 14px 8px;
  border: 2px solid #ddd;
  border-radius: 8px;
  background: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  color: #333;
}
.ntd-amount-btn:hover, .ntd-amount-btn.ntd-selected {
  border-color: var(--ntd-green);
  background: var(--ntd-green-light);
  color: var(--ntd-green);
}
.ntd-custom-amount {
  margin-bottom: 14px;
}
.ntd-custom-amount label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--ntd-green);
  border: 2px solid #ddd;
  border-radius: 8px;
  padding: 10px 14px;
  transition: border-color .2s;
}
.ntd-custom-amount label:focus-within { border-color: var(--ntd-green); }
.ntd-custom-amount input {
  border: none;
  outline: none;
  font-size: 16px;
  flex: 1;
  width: 100%;
}

/* Recurring */
.ntd-recurring-wrap { margin-bottom: 20px; }
.ntd-toggle-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: #555;
}
.ntd-recurring-options { margin-top: 10px; }
.ntd-recurring-options select {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
}

/* Fields */
.ntd-field-group { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.ntd-step label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; color: #444; margin-bottom: 12px; }
.ntd-step input[type=text],
.ntd-step input[type=email],
.ntd-step input[type=tel],
.ntd-step input[type=number],
.ntd-step textarea {
  padding: 10px 13px;
  border: 1.5px solid #ddd;
  border-radius: 7px;
  font-size: 15px;
  transition: border-color .2s;
  font-family: inherit;
}
.ntd-step input:focus, .ntd-step textarea:focus {
  border-color: var(--ntd-green);
  outline: none;
}
.ntd-req { color: #e44; }

/* Summary */
.ntd-summary-box {
  background: var(--ntd-green-light);
  border: 1px solid #c8e6c9;
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 18px;
}
.ntd-summary-box p { margin: 3px 0; font-size: 15px; }
.ntd-summary-amount { color: var(--ntd-green); font-size: 20px; }

/* Payment options */
.ntd-payment-methods { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.ntd-payment-option {
  border: 2px solid #ddd;
  border-radius: 8px;
  padding: 14px 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color .2s, background .2s;
}
.ntd-payment-option input[type=radio] { position: absolute; opacity: 0; }
.ntd-payment-option:has(input:checked) {
  border-color: var(--ntd-green);
  background: var(--ntd-green-light);
}
.ntd-payment-label { font-weight: 700; font-size: 15px; }
.ntd-payment-desc  { font-size: 12px; color: #666; }

.ntd-bank-details {
  background: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 16px;
  display: none;
}
.ntd-bank-details.ntd-visible { display: block; }
.ntd-bank-details h4 { margin: 0 0 8px; font-size: 14px; }
.ntd-bank-details pre { margin: 0; font-size: 13px; white-space: pre-wrap; }

/* Buttons */
.ntd-btn {
  display: inline-block;
  padding: 13px 28px;
  background: var(--ntd-green);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background .2s, transform .1s;
}
.ntd-btn:hover { background: var(--ntd-green-hover); transform: translateY(-1px); color: #fff; }
.ntd-btn-back { background: #eee; color: #555; }
.ntd-btn-back:hover { background: #ddd; color: #333; }
.ntd-step-nav {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 18px;
}
/* Back button — fixed compact size */
.ntd-btn-back {
  flex: 0 0 auto;
  padding: 11px 20px;
  font-size: 14px;
}
/* Donate submit — compact, never huge */
.ntd-btn-submit {
  flex: 0 0 auto;
  padding: 11px 28px;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  margin-left: auto;      /* push to right, no stretching */
}

.ntd-secure-note { text-align: center; font-size: 12px; color: #888; margin-top: 10px; }

/* Alerts */
.ntd-alerts { padding: 12px 16px; border-radius: 7px; margin-bottom: 16px; font-size: 14px; }
.ntd-alert-error   { background: #ffeaea; border: 1px solid #f5c6c6; color: #c0392b; }
.ntd-alert-success { background: #e8f5e9; border: 1px solid #c8e6c9; color: #2d7a3a; }

/* Success */
.ntd-step-success { text-align: center; padding: 50px 30px; }
.ntd-success-icon { font-size: 64px; margin-bottom: 16px; }
.ntd-step-success h2 { font-size: 28px; color: var(--ntd-green); margin-bottom: 12px; }
.ntd-success-message { font-size: 16px; color: #555; margin-bottom: 24px; }

/* Donate Button shortcode */
.ntd-btn-donate {
  display: inline-block;
  padding: 13px 28px;
  color: #fff !important;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  transition: opacity .2s;
}
.ntd-btn-donate:hover { opacity: .88; }

/* Total raised */
.ntd-total-raised { font-weight: 700; font-size: 1.2em; color: var(--ntd-green); }

/* ── Campaign Cards ─────────────────────────────────────────────────────── */
.ntd-campaigns-grid {
  display: grid;
  gap: 24px;
  margin: 20px 0;
}
.ntd-cols-2 { grid-template-columns: repeat(2, 1fr); }
.ntd-cols-3 { grid-template-columns: repeat(3, 1fr); }
.ntd-cols-4 { grid-template-columns: repeat(4, 1fr); }

.ntd-campaign-card {
  background: #fff;
  border-radius: var(--ntd-radius);
  box-shadow: var(--ntd-shadow);
  overflow: hidden;
  transition: transform .2s;
}
.ntd-campaign-card:hover { transform: translateY(-3px); }

.ntd-campaign-img {
  height: 180px;
  background-size: cover;
  background-position: center;
}
.ntd-campaign-img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  background: var(--ntd-green-light);
}
.ntd-campaign-body { padding: 18px; }
.ntd-campaign-title { margin: 0 0 8px; font-size: 17px; }
.ntd-campaign-title a { text-decoration: none; color: #333; }
.ntd-campaign-excerpt { font-size: 13px; color: #666; margin: 0 0 12px; line-height: 1.5; }

.ntd-progress-wrap { margin-bottom: 12px; }
.ntd-progress-bar { background: #e0e0e0; border-radius: 10px; height: 8px; margin-bottom: 6px; }
.ntd-progress-fill { background: var(--ntd-green); height: 100%; border-radius: 10px; transition: width .4s; }
.ntd-progress-stats { display: flex; justify-content: space-between; font-size: 12px; color: #666; }

.ntd-campaign-meta { display: flex; gap: 14px; font-size: 12px; color: #777; margin-bottom: 14px; }
.ntd-btn-campaign { width: 100%; text-align: center; padding: 10px; font-size: 14px; box-sizing: border-box; }

/* Loading */
.ntd-loading {
  display: inline-block;
  width: 18px; height: 18px;
  border: 3px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ntd-spin .7s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}
@keyframes ntd-spin { to { transform: rotate(360deg); } }

@media (max-width: 600px) {
  .ntd-field-group       { grid-template-columns: 1fr; }
  .ntd-amount-grid       { grid-template-columns: repeat(2,1fr); }
  .ntd-campaigns-grid    { grid-template-columns: 1fr !important; }
  .ntd-form-wrap         { margin: 0; border-radius: 0; }
  .ntd-step              { padding: 20px 16px; }
  .ntd-form-title        { padding: 18px 16px; font-size: 18px; }
  /* Keep nav row clean — back left, donate right */
  .ntd-step-nav          { gap: 8px; }
  .ntd-btn-back          { padding: 10px 16px; font-size: 13px; }
  .ntd-btn-submit        { padding: 10px 22px; font-size: 14px; }
  .ntd-btn-next          { width: 100%; text-align: center; }
  /* Amount grid 2 cols on small screens */
  .ntd-amount-grid       { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .ntd-amount-btn        { padding: 12px 6px; font-size: 14px; }
  /* Summary box */
  .ntd-summary-amount    { font-size: 17px; }
}

/* ── Payment Link Notice ───────────────────────────────────────────────────── */
.ntd-paylink-notice {
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 16px;
}
.ntd-paylink-notice-inner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.ntd-paylink-icon { font-size: 24px; flex-shrink: 0; margin-top: 2px; }
.ntd-paylink-notice strong { font-size: 14px; display: block; margin-bottom: 3px; }
.ntd-paylink-notice p { margin: 0; font-size: 13px; color: #666; }

/* ── Campaign single-page stats ────────────────────────────────────────────── */
.ntd-campaign-single-stats { margin-bottom: 28px; }
.ntd-campaign-progress-wrap {
  background: #fff;
  border-radius: 10px;
  padding: 20px 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
  margin-bottom: 20px;
}
.ntd-campaign-progress-wrap .ntd-progress-bar {
  height: 12px;
  margin-bottom: 14px;
}
.ntd-campaign-stat-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.ntd-stat-box {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 80px;
}
.ntd-stat-center { text-align: center; flex: 1; }
.ntd-stat-right  { text-align: right; margin-left: auto; }
.ntd-stat-value  { font-size: 22px; font-weight: 700; color: var(--ntd-green); }
.ntd-stat-label  { font-size: 12px; color: #888; }

.ntd-campaign-donate-section { margin-top: 32px; }

/* ── Alert success colour uses CSS var ─────────────────────────────────────── */
.ntd-alert-success { color: var(--ntd-green); }
