/* ==========================================================================
   MODULE: MODALS, DIALOGS & COMPACT DONATION BOXES
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 27, 18, 0.95);
  backdrop-filter: blur(16px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-container {
  background: white;
  width: 90%;
  max-width: 650px;
  border-radius: 24px;
  padding: 50px;
  position: relative;
  transform: translateY(30px);
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.05);
  color: #1f2937;
}

.modal-overlay.active .modal-container {
  transform: translateY(0);
}

.modal-close-btn {
  position: absolute;
  top: 24px;
  right: 24px;
  background: transparent;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #81c784;
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.modal-close-btn:hover {
  color: #064e3b;
  transform: rotate(90deg);
}

.modal-title {
  font-size: 32px;
  margin-bottom: 16px;
  color: #064e3b;
  text-align: left;
}

.modal-body {
  margin-bottom: 30px;
  font-size: 16px;
  line-height: 1.7;
  text-align: left;
}

.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  color: #146c43;
}

.form-control {
  width: 100%;
  background: #f8fafc;
  border: 1px solid rgba(16, 43, 30, 0.1);
  border-radius: 12px;
  padding: 14px 18px;
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  outline: none;
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  color: #1f2937;
}

.form-control:focus {
  border-color: #198754;
  box-shadow: 0 0 10px rgba(44, 110, 73, 0.15);
  background: white;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.booking-summary {
  margin: 8px 0 18px;
  padding: 16px;
  border: 1px solid rgba(44, 110, 73, 0.16);
  border-radius: 8px;
  background: #f6faf7;
  color: #1f2937;
  font-size: 14px;
  line-height: 1.55;
  text-align: left;
}

.booking-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 6px;
}

.booking-summary-row.total {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(44, 110, 73, 0.16);
  font-size: 18px;
  font-weight: 800;
}

/* Fundraising Specific Fields */
.donation-box-compact {
  padding: 24px;
  box-shadow: none;
  border-color: rgba(16, 43, 30, 0.1);
}

.donation-box-compact .donation-presets {
  margin-top: 18px;
}

#header-donation-box .donation-type-toggle {
  justify-content: center;
}

#header-donation-box .type-toggle-btn {
  text-align: center;
  white-space: normal;
}

#header-donation-box .donation-presets {
  grid-template-columns: repeat(2, minmax(140px, 1fr));
  justify-items: center;
  max-width: 380px;
}

#header-donation-box .preset-btn {
  width: 100%;
  text-align: center;
  white-space: nowrap;
  padding-left: 16px;
  padding-right: 16px;
}

.donate-modal-links {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.donate-modal-links a {
  color: #198754;
  font-weight: 800;
  text-decoration: underline;
}

.donation-presets {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 12px;
  justify-content: center;
  max-width: 660px;
  margin: 30px auto 20px auto;
}

.preset-btn {
  background: transparent;
  border: 1px solid rgba(16, 43, 30, 0.15);
  color: #1f2937;
  padding: 12px 24px;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  font-size: 15px;
  min-height: 48px;
}

.preset-btn:hover, .preset-btn.active {
  background: #146c43;
  color: white;
  border-color: #146c43;
  box-shadow: 0 4px 15px rgba(24, 66, 45, 0.15);
}

.custom-amount-container {
  max-width: 480px;
  margin: 0 auto 30px auto;
  position: relative;
}

.custom-amount-input {
  width: 100%;
  background: #f8fafc;
  border: 1px solid rgba(16, 43, 30, 0.12);
  border-radius: 50px;
  padding: 16px 20px 16px 45px;
  color: #1f2937;
  font-size: 18px;
  font-weight: 600;
  outline: none;
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.custom-amount-input:focus {
  border-color: #198754;
  box-shadow: 0 0 15px rgba(44, 110, 73, 0.1);
  background: white;
}

.currency-symbol {
  position: absolute;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  font-weight: 600;
  color: #198754;
}

.donate-submit-btn {
  background: #f75f2c;
  color: white;
  width: 100%;
  max-width: 420px;
  border: none;
  padding: 16px;
  border-radius: 50px;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 15px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.donate-submit-btn:hover {
  background: #fa7c50;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(247, 95, 44, 0.4);
}

.donation-actions {
  display: flex;
  justify-content: center !important;
  align-items: center;
  width: 100%;
}

.donation-type-toggle {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.type-toggle-btn {
  background: rgba(16, 43, 30, 0.05);
  border: 1px solid rgba(16, 43, 30, 0.1);
  color: #1f2937;
  padding: 10px 24px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.type-toggle-btn.active {
  background: #146c43;
  color: white;
  border-color: #146c43;
  box-shadow: 0 4px 15px rgba(24, 66, 45, 0.15);
}

.sponsor-container {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 15px;
}

.sponsor-tag {
  background: rgba(44, 110, 73, 0.1);
  border: 1px solid rgba(44, 110, 73, 0.2);
  color: #198754;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pledge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.pledge-box {
  background: #f8fafc;
  border: 1px solid rgba(16, 43, 30, 0.08);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}

.pledge-title {
  font-size: 16px;
  font-weight: 700;
  color: #146c43;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.pledge-val {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 700;
  color: #f75f2c;
  margin-bottom: 4px;
}

.pledge-once {
  font-size: 13px;
  opacity: 0.7;
}

.bank-details-box {
  background: #f4f6f5;
  border-left: 4px solid #f75f2c;
  padding: 20px;
  border-radius: 8px;
  margin-top: 16px;
  font-size: 16px;
}

.bank-row {
  margin-bottom: 8px;
}

.bank-row strong {
  color: #064e3b;
}

.support-modal-container {
  max-width: 720px;
}


/* Compact support checkout modal */
.donate-modal-container {
  max-width: 640px;
  max-height: min(92vh, 860px);
  overflow-y: auto;
  padding: 34px 34px 28px;
}

.donate-modal-container .modal-title {
  margin-bottom: 8px;
}

.donate-modal-container .donation-box-compact {
  padding: 20px;
}

.type-toggle-btn small {
  display: block;
  margin-top: 2px;
  font-size: 0.68em;
  line-height: 1;
  letter-spacing: 0.08em;
  opacity: 0.78;
  font-weight: 800;
}

.type-toggle-btn span {
  display: block;
}

#header-donation-box .donation-type-toggle {
  gap: 8px;
  margin-bottom: 18px;
}

#header-donation-box .type-toggle-btn {
  min-width: 150px;
  padding: 10px 16px;
  line-height: 1.08;
}

#header-donation-box .donation-presets {
  gap: 10px;
  margin: 16px auto 14px;
}

#header-donation-box .preset-btn {
  min-height: 42px;
  padding-top: 9px;
  padding-bottom: 9px;
}

#header-donation-box .custom-amount-container {
  margin-bottom: 18px;
}

#header-donation-box .custom-amount-input {
  padding-top: 13px;
  padding-bottom: 13px;
  font-size: 16px;
}

#header-donation-box .checkout-optin {
  margin-bottom: 16px;
  padding: 12px 14px;
}

#header-donation-box .donate-submit-btn {
  min-height: 48px;
  padding: 13px 18px;
}

.donate-modal-links {
  margin-top: 12px;
  gap: 12px;
  font-size: 0.94rem;
}

@media (max-width: 720px), (max-height: 780px) {
  .donate-modal-container {
    width: min(94vw, 620px);
    max-height: 90vh;
    padding: 26px 18px 20px;
  }

  .donate-modal-container > p {
    margin-bottom: 14px !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
  }

  .donate-modal-container .modal-title {
    font-size: clamp(1.8rem, 7vw, 2.35rem);
  }

  #header-donation-box .donation-type-toggle {
    gap: 7px;
  }

  #header-donation-box .type-toggle-btn {
    min-width: 0;
    max-width: none;
    flex: 1 1 145px;
    font-size: 12px;
    padding: 10px 12px;
  }

  #header-donation-box .donation-presets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 320px;
  }

  .donate-modal-links {
    padding-bottom: 4px;
  }
}
