/* ==========================================================================
   Donate Page Layout & Custom Donation Widget Styles
   ========================================================================== */

/* Ways to Give Grid */
.ways-to-give-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: stretch;
}

@media (max-width: 1024px) {
  .ways-to-give-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.way-card {
  background-color: var(--white);
  border: 1px solid var(--border-muted);
  border-radius: var(--border-radius);
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.3s ease;
  position: relative;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.02);
}

.way-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.05);
  border-color: var(--accent-gold);
}

.way-header {
  margin-bottom: 1rem;
}

.way-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-gold-dark);
  background-color: var(--bg-sand);
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
  margin-bottom: 1rem;
}

.way-title {
  font-family: var(--font-serif);
  font-size: 1.7rem;
  color: var(--primary-brand);
  margin-bottom: 0.5rem;
}

.way-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 0;
}

.way-tier-preview-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 2rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.way-tier-preview-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background-color: var(--bg-sand);
  border-radius: calc(var(--border-radius) / 2);
  font-size: 0.9rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.way-tier-preview-item:hover {
  background-color: var(--white);
  border-color: var(--accent-gold);
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.way-tier-preview-name {
  font-weight: 600;
  color: var(--text-dark);
}

.way-tier-preview-val {
  font-family: var(--font-sans);
  font-weight: 700;
  color: var(--accent-gold-dark);
  font-size: 0.85rem;
}

/* Trust / Security Note */
.donate-trust-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.85rem;
  text-align: center;
}

.donate-trust-note svg {
  color: var(--accent-gold-dark);
}

/* Modal Selected Tier & Amount Highlight Banner */
.modal-tier-highlight {
  background: linear-gradient(135deg, var(--bg-sand) 0%, #F4EFE6 100%);
  border: 1.5px solid var(--accent-gold);
  border-radius: var(--border-radius);
  padding: 1rem 1.25rem;
  margin: 1.25rem 0 1.5rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 14px rgba(194, 163, 120, 0.15);
  animation: fadeInDown 0.3s ease-out;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-tier-badge {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.modal-tier-icon-wrap {
  width: 44px;
  height: 44px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
  box-shadow: none;
}

.modal-tier-icon-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.modal-tier-icon-wrap svg {
  width: 28px;
  height: 28px;
  stroke: var(--accent-gold-dark);
}

.modal-tier-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-gold-dark);
  margin-bottom: 0.1rem;
}

.modal-tier-amount-display {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary-brand);
  line-height: 1.1;
}

.modal-tier-freq-badge {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--bg-forest);
  background-color: var(--accent-gold);
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  white-space: nowrap;
}

/* Allocation Grid Styles (Budget Allocation Section) */
.allocation-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.5rem;
  margin: 3rem 0 1rem 0;
}

.allocation-card {
  background-color: var(--bg-cream);
  border: 1px solid var(--border-muted);
  border-radius: var(--border-radius);
  padding: 2.2rem 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
}

.allocation-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-gold);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

.allocation-percent {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  color: var(--accent-gold-dark);
  font-weight: 500;
  margin-bottom: 0.5rem;
  line-height: 1;
}

.allocation-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dark);
  margin-bottom: 0.8rem;
}

.allocation-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 0;
}

@media (max-width: 1024px) {
  .allocation-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .allocation-card {
    display: flex;
    align-items: center;
    text-align: left;
    gap: 1.5rem;
    padding: 1.5rem;
  }

  .allocation-percent {
    margin-bottom: 0;
    min-width: 70px;
  }

  .allocation-title {
    margin-bottom: 0.3rem;
  }
}

/* Custom Donation Widget Card (embedded inside Method 1 card) */
.custom-donation-card {
  width: 100%;
  background-color: #FAF8F5;
  border: 1px solid var(--border-muted);
  border-radius: var(--border-radius);
  overflow: hidden;
  margin-top: 1.25rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02);
}

.custom-donation-tabs {
  display: flex;
  background-color: #EFECE6;
  border-bottom: 1px solid var(--border-muted);
  padding: 0.5rem;
  gap: 0.5rem;
}

.custom-tab-btn {
  flex: 1;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: calc(var(--border-radius) / 2);
  background: transparent;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.custom-tab-btn:hover {
  color: var(--text-dark);
}

.custom-tab-btn.active {
  background-color: var(--accent-gold);
  color: var(--bg-forest);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.custom-donation-body {
  padding: 1.75rem 1.5rem;
}

.custom-donation-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dark);
  margin-bottom: 1.25rem;
  text-align: center;
}

.custom-amounts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.custom-amount-btn {
  padding: 0.85rem 0.5rem;
  border: 1px solid #E2DEC3;
  border-radius: calc(var(--border-radius) / 2);
  background-color: var(--white);
  color: var(--text-dark);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.custom-amount-btn small {
  font-size: 0.72rem;
  font-weight: 400;
  opacity: 0.8;
}

.custom-amount-btn:hover {
  border-color: var(--accent-gold-dark);
  background-color: #F4F0E8;
}

.custom-amount-btn.active {
  background-color: var(--accent-gold);
  border-color: var(--accent-gold-dark);
  color: var(--bg-forest);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(194, 163, 120, 0.25);
}

.custom-other-wrapper {
  grid-column: 1 / -1;
  position: relative;
}

.custom-other-input {
  width: 100%;
  padding: 0.8rem 1rem 0.8rem 2.2rem;
  border: 1px solid #E2DEC3;
  border-radius: calc(var(--border-radius) / 2);
  background-color: var(--white);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dark);
  transition: all 0.2s ease;
}

.custom-other-input:focus {
  outline: none;
  border-color: var(--accent-gold-dark);
  background-color: var(--white);
  box-shadow: 0 0 0 3px rgba(194, 163, 120, 0.2);
}

/* Rejected amount on the card, matching the modal's invalid styling. */
.custom-other-input.is-invalid,
.custom-other-input.is-invalid:focus {
  border-color: #C0392B;
  background-color: #FDF3F2;
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.12);
}

/* Full width under the amount inputs. The grid's own gap does the spacing, so
   no margin here - and none at all while hidden, or it would leave a gap. */
#custom-amount-error {
  grid-column: 1 / -1;
  margin-top: 0;
}

.custom-other-symbol {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 700;
  color: var(--text-muted);
}

.btn-donate-submit {
  width: 100%;
  padding: 1rem;
  border: none;
  border-radius: calc(var(--border-radius) / 2);
  background-color: var(--accent-gold);
  color: var(--bg-forest);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(194, 163, 120, 0.3);
}

.btn-donate-submit:hover {
  background-color: var(--accent-gold-dark);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(194, 163, 120, 0.4);
}
