/* General page styling */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.contribute-page {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 700px;
    margin: 0 auto;
    padding: 20px 14px;
    font-family: system-ui, sans-serif;
}

.contribute-page h1 {
    font-size: 32px;
    font-weight: 600;
    text-align: center;
    margin: 0;
}

.span-title {
    font-family: 'Playfair Display', serif;
    font-size: 34px;
    font-weight: 700;
}

@media(max-width: 500px){
    .contribute-page h1 {
        font-size: 28px;
    }
    .span-title {
        font-size: 30px;
    }
}

@media(max-width: 430px){
    .contribute-page h1 {
        font-size: 26px;
    }
    .span-title {
        font-size: 28px;
    }
}

@media(max-width: 395px){
    .contribute-page h1 {
        font-size: 24px;
    }
    .span-title {
        font-size: 26px;
    }
}

@media(max-width: 370px){
    .contribute-page h1 {
        font-size: 20px;
    }
    .span-title {
        font-size: 22px;
    }
}

.para {
    text-align: justify;
    font-size: 18px;
    color: #4a4a4a;
    margin-bottom: 28px;
}

.why-support {
    margin-bottom: 40px;
}

.para.why {
    margin-bottom: 0;
}

@media(max-width:550px) {
    .para {
        font-size: 16px;
    }
}

.contribute-page h2 {
    font-size: 1.5rem;
    margin: 0;
    border-bottom: 2px solid #ddd;
    padding-bottom: 5px;
}

.payment-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 280px;
    width: 100%;
    max-width: 650px;
    padding: 0 4px;
}

.step-wrap {
    position: relative;
    width: 100%;
}

.step-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  left: 50%;
  transform: translate(-50%, 0);
  width: 100%;
  transition: opacity 0.25s ease;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 1;
}

#step-amt {
    top: -40px;
    position: absolute;
}

#step-email {
    top: 0;
    position: absolute;
}

#step-pmt-opts,#step-crd-pmt {
    position: relative;
}

.hide {
  height: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: -1;
}

/* Amount Input block */
#amount-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

#amt-lbl {
    font-size: 18px;
    font-weight: 600;
    color: #0b1c2c;
}

.amount-input-wrap {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
     
}

/* Push input text right so dollar doesn’t overlap */
.amount-input-wrap input#amount {
    height: 45px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 20px;
    width: 140px;
    text-align: center; /* forces numbers after $ */
}

/*Email Block*/
.email-wrap {
  font-size: 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  max-width: 400px;
}

.email-label {
  font-weight: 600;
  color: #0b1c2c;
  padding: 0 4px;
}

#receipt-email {
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  width: 100%;
  box-sizing: border-box;
  margin: 8px 0 0;
}

.input-error {
  font-size: 14.5px;
  color: #b00020; /* clean, modern error red */
  padding: 0 10px;
  margin: 2px 0 4px;
  min-height: 20px; /* reserves space even when hidden */
}

.checkbox-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: #333;
  margin-bottom: 4px;
}

.checkbox-wrap input[type="checkbox"] {
  accent-color: #0b1c2c;
  width: 16px;
  height: 16px;
}

.btn-row {
    margin-top: 20px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 30px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 17px;
  font-weight: 500;
  color: #0B1C2C;
  background-color: transparent;
  border: 2px solid transparent;
  padding: 10px 18px;
  height: 44px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.2s ease;
}

.back-btn svg {
  stroke: currentColor;
  height: 20px;
  width: 20px;
  flex-shrink: 0;
}

.back-btn:hover {
  background-color: rgba(11, 28, 44, 0.06); /* subtle dark hover fill */
  color: #0B1C2C;
}

/*Payment Options*/
.pmt-opts {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    min-height: 180px;
    width: 100%;
    max-width: 100%;
    gap: 15px;
}

.pmt-opts.hide {
    display: none;
}

.pmt-opt-st {
    font-size: 18px;
}

.pmt-btns {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#cont-amt-btn {
    margin-top: 8px;
}

.btn-spinner {
  width: 18px;
  height: 18px;
  margin-left: 10px;
  border: 2px solid #0B1C2C;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: none;
  vertical-align: middle;
}

.btn-spinner.show {
    display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.cont-btn:hover .btn-spinner{
  border: 2px solid #ffffff;
  border-top-color: transparent;
}


.cont-btn {
  height: 44px;
  max-height: 44px;
  width: clamp(200px, 100%, 291px);
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 600;
  padding: 0 13px;
  border: 2px solid #0B1C2C;
  background-color: #dbe3ec;
  color: #0B1C2C;     
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

.cont-svg {
  display: inline-block;
  stroke: currentColor;
  height: 22px;
  width: 22px;
  flex-shrink: 0;
}

.cont-svg.hide {
  display: none;
}

.cont-btn:hover {
  background-color: #0B1C2C;
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.btn-content {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

#cc-btn {
    margin-bottom: 8px;
}

.swoosh-wrap {
  position: relative;
  display: inline-block;
}

.swoosh {
  position: absolute;
  top: 50%;
  left: -4px;
  width: 9px;
  height: 3px;
  background: #6F90B3;
  transform: translateY(-50%) scaleX(0);
  transform-origin: left;
  opacity: 0.6;
  transition: transform 0.3s ease, opacity 0.3s ease;
  border-radius: 1.5px;
}

.swoosh.delay-1 {
  top: calc(50% - 5px);
  left: -6px;
  width: 8px;
  opacity: 0.4;
}

.swoosh.delay-2 {
  top: calc(50% + 5px);
  left: -5px;
  width: 7px;
  opacity: 0.3;
}

.swoosh-wrap .swoosh:nth-child(1) {
  top: 0; /* center line */
}

#cc-btn:hover .swoosh {
  transform: scaleX(1);
  opacity: 1;
}

#cc-btn:hover .swoosh {
  transform: translateY(-50%) scaleX(1);
  opacity: 1;
}

.icon {
  height: 28px;
  width: auto;
  stroke: #0B1C2C;
  stroke-width: 2;
  fill: #6F90B3;
  display: block;
  transition: transform 0.25s ease, stroke 0.25s ease;
}

.cont-btn:hover .icon {
  /*fill: #AC9D13;*/
  stroke: #ffffff;
  transform: translateX(6px);
}


/* Payment form */
#card-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
    max-width: 100%;
    max-height: 60px;
}

.pmt-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 500px;
}

/* Contribution amount bar */
.fixed-contribute {
    background-color: #f5f7fa;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px 20px;
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #0b1c2c;
    text-align: center;
    width: 100%;
    max-width: 400px;
}

/* Stripe payment element styles */
#payment-element {
    width: 100%;
    transition: opacity 0.6s ease;
}

.button-wrap {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    width: 100%;
}

/* Stripe submit button */
#submit-pmt {
    background-color: #0b1c2c;
    color: #fff;
    border: none;
    padding: 12px 34px;
    border-radius: 6px;
    font-size: 19px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#submit-pmt:hover {
    background-color: #1a4063;
}

/* Change amount button */
.cncl-pmt {
    background-color: #e5e7eb;
    color: #0b1c2c;
    border: none;
    padding: 8px 20px;
    width: 120px;
    border-radius: 6px;
    font-size: 17px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.cncl-pmt:hover {
    background-color: #d1d5db;
}

/* Thank you section */
.thank-you {
    display: block;
    text-align: center;
    font-size: 0.95rem;
    color: #555;
    margin: 15px 0 0;
}

.thank-you p {
    margin: 0;
}

.thank-you.hidden {
    display: none;
}

#pmt-msg {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #111;
  text-align: center;
  text-transform: uppercase;
  padding: 10px 0;
  opacity: 0;
  transition: transform 0.4s ease;
  margin: 0 auto;
  width: fit-content;
  max-width: 100%;
  height: 0;
  transform: translateY(-10px); 
}

#pmt-msg.show {
  min-height: 70px;
  opacity: 1;
  transform: translateY(0);
}

#pmt-msg.toast {
    background-color: #0b1c2c;
    color: white;
    padding: 0 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    font-size: 1rem;
    text-align: center;
}

.checkmark-inline {
  width: 36px;
  height: 36px;
  vertical-align: middle;
  margin-right: 8px;
}

.checkmark-circle-chrg {
  stroke: white;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 132;
  stroke-dashoffset: 132;
  animation: draw-circle 0.5s ease-out .5s forwards;
}

.checkmark-check-chrg {
  stroke: white;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  stroke-dasharray: 36;
  stroke-dashoffset: 36;
  animation: draw-check 0.5s ease-out 1s forwards;
}

.chrg-line {
  position: relative;
}

.chrg-line::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  background-color: white;
  pointer-events: none;
}

.float-burst {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%, 0);
  font-size: 27px;
  opacity: 0;
  pointer-events: none;
  z-index: 1000;
  max-width: 350px;
  white-space: nowrap;
}

.burst-emoji {
  width: 40px;
  height: 40px;
}

.burst-emoji.burst-animate {
  animation: burstFloat-emoji 4s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

@keyframes burstFloat-emoji {
  0% {
    opacity: 0;
    transform: translate(-50%, 20px) scale(0.9);
  }
  30% {
    opacity: 1;
  }
  70% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -200px) scale(2);
  }
}

.burst-text {
  background-color: white;
  padding: 8px 20px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.1); /* light, soft border */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12); /* soft outer glow */
  font-weight: 600;
  color: #2e7d32;
}

.burst-text.burst-animate {
  animation: burstFloat-text 4s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

@keyframes burstFloat-text {
  0% {
    opacity: 0;
    transform: translate(-50%, 20px) scale(0.9);
  }
  30% {
    opacity: 1;
  }
  70% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -110px) scale(1.25);
  }
}

.payment-disclaimer {
    font-size: 0.95rem;
    color: #4a4a4a;
    text-align: justify;
    margin-top: 20px;
}

.payment-disclaimer p {
    margin: 0;
}

.payment-disclaimer a {
    color: #0b1c2c;
    text-decoration: underline;
}


/* Mobile tweaks */
@media (max-width: 480px) {

    .contribute-page h2 {
        font-size: 1.3rem;
    }

    #submit {
        width: 100%;
    }
}