.donate-section {
  position: relative;
  background-color: #000;
  background-size: cover;
  background-position: center;
  color: #333;
  padding-top: 32px;
  padding-bottom: 32px;
}

.donate-section__content h2 {
  font-size: 32px;
  font-weight: 600;
  margin-bottom: 24px;
}

.donate-section__content > p {
  font-size: 16px;
  margin-top: 0;
  margin-bottom: 32px;
}

@media (min-width: 1024px) {
  .donate-section {
    padding-top: 120px;
    padding-bottom: 120px;
  }

  .donate-section .container {
    display: flex;
    align-items: center;
    gap: 174px;
  }

  .donate-section__content {
    flex: 1;
    order: 2;
  }

  .donate-section__content h2 {
    font-size: 42px;
  }

  .donate-section__form {
    width: 504px;
    flex-shrink: 0;
    order: 1;
  }
}

.donate-form {
  background: #fff;
  color: #333;
  padding: 32px 24px;
  border-radius: 4px;
  margin-top: 32px;
}

.donate-form__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.donate-form__header h3 {
  font-size: 24px;
  font-weight: 600;
  margin: 0;
}

.donate-form .currency-selector {
  position: relative;
}

.donate-form .currency-selector .custom-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  border: 1px solid #d9d9d9;
  height: 38px;
  border-radius: 4px;
  width: 103px;
  padding: 0 12px;
  background-color: transparent;
  cursor: pointer;
}

.donate-form__options {
  display: flex;
  gap: 16px;
  margin-top: 28px;
}

.donate-form__amounts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 20px;
  margin-bottom: 50px;
}

.donate-form__amounts .input-amount {
  grid-column: 1 / -1;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 0 12px;
  text-align: center;
  width: 100%;
  height: 38px;
}

.donate-form__amounts .input-amount:focus::placeholder {
  color: transparent;
}

.donate-form__agreement {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 20px;
}

.donate-form__agreement label {
  font-size: 12px;
  color: #777;
}

.donate-form > .btn {
  margin-top: 20px;
  width: 100%;
}

.donate-cards {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.donate-card {
  border-radius: 6px;
  background: var(--white-80, rgba(255, 255, 255, 0.8));
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.donate-card__icon {
  margin-bottom: 12px;
}

.donate-card__icon img {
  width: 38px;
  height: 38px;
}

.donate-card__content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.donate-card__title {
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  text-transform: uppercase;
  margin-top: 0;
  margin-bottom: 12px;
}

.donate-card__text {
  text-align: center;
  font-size: 18px;
  font-weight: 400;
  margin: 0;
}

@media (max-width: 768px) {
  .donate-cards {
    flex-direction: column;
    gap: 16px;
  }

  .donate-card {
    width: 100%;
  }
}
.donate-form-stepper {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin-top: 48px;
}

/* This is the background line */
.donate-form-stepper::before {
  content: "";
  position: absolute;
  top: 9px; /* (20px circle - 2px line) / 2 */
  left: 10px; /* half of circle */
  right: 10px; /* half of circle */
  height: 2px;
  background-color: #d9d9d9;
  z-index: 1;
}

/* This is the progress line, it will be controlled by a class on the stepper */
.donate-form-stepper.step-2-active::after,
.donate-form-stepper.step-3-active::after {
  content: "";
  position: absolute;
  top: 9px;
  left: 10px;
  height: 2px;
  background-color: #da291c;
  z-index: 1;
  transition: width 0.4s ease-in-out;
}

.donate-form-stepper.step-2-active::after {
  width: 50%;
}

.donate-form-stepper.step-3-active::after {
  width: 100%;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 2; /* circles above line */
}

/* adjust position of first and last to align with line ends */
.step:first-child {
  align-items: flex-start;
}
.step:last-child {
  align-items: flex-end;
}
.step:not(:first-child):not(:last-child) {
  /* This will center the middle step */
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.step-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: white;
  background: #d9d9d9;
  border: 2px solid #fff; /* punch out from line */
  position: relative;
  z-index: 2;
  font-size: 12px;
}
.step-label {
  margin-top: 8px;
  font-size: 14px;
  color: #333;
}
.step.active .step-circle {
  background: #da291c;
  border-color: #da291c;
}
.step.completed .step-circle {
  background: #ffffff;
  border-color: #da291c;
  color: #da291c;
}

/* Hide the old line elements */
.step-line,
.step-line-fill {
  display: none;
}

.donate-form__step {
  display: none;
}
.donate-form__step.active {
  display: block;
}

#next-step-btn {
  width: 100%;
}

.payment-type-selector {
  background-color: #f2f2f2;
  border-radius: 8px;
  padding: 4px;
  display: flex;
}
.payment-type-btn {
  flex: 1;
  background: transparent;
  color: #333;
  border: none;
  border-radius: 6px;
  padding: 10px;
  font-size: 16px;
  cursor: pointer;
}
.payment-type-btn.active {
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.payment-type-description {
  margin-top: 8px;
  margin-bottom: 24px;
  font-size: 14px;
  color: #777;
}

.donate-form__amounts .btn {
  border-color: #d9d9d9;
  color: #272727;
  font-weight: 400;
}

.donate-form__amounts .btn.active,
.donate-form__amounts .btn:hover {
  background: #da291c;
  color: #fff;
  border-color: #da291c;
}

.donate-form__field-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 20px;
}
.donate-form__field-group.full-width-email .email-field {
  grid-column: 1 / -1;
}

.form-field {
  display: flex;
  flex-direction: column;
}
.form-field:has(input[required]) label {
  &:after {
    content: "*";
    margin-left: 2px;
    color: red;
  }
}
.form-field label {
  font-size: 14px;
  margin-bottom: 4px;
}
.form-field label .required-star {
  color: red;
}
.form-field input:not(.iti__search-input) {
  border-radius: 6px;
  border: 1px solid #d9d9d9;
  height: 40px;
  padding: 10px 12px;
  width: 100%;
}

.donate-form__agreement-step2 {
  margin-top: 16px;
  margin-bottom: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.donate-form__agreement-step2 input[type="checkbox"] {
  width: 24px;
  height: 24px;
}

.donate-form__buttons {
  display: flex;
  gap: 14px;
  margin-top: 24px;
}

@media screen and (max-width: 768px) {
  .donate-form__buttons img {
    display: none;
  }
}

#prev-step-btn {
  flex: 0 0 40%;
  padding-left: 8px;
  padding-right: 8px;
}

#submit-button {
  flex-grow: 1;
}

.btn.btn--back {
  background: #fff;
  color: #ff0000;
  border: 1px solid #d9d9d9;
}

.btn.btn--back img {
  transform: rotate(180deg);
}

.form-error-message {
  color: #da291c;
  font-size: 12px;
  margin-top: 4px;
  display: none;
}

.form-field input.error {
  border-color: #da291c;
}

.donate-form__agreement-step2 {
  position: relative;
}

.donate-form__agreement-step2 input[type="checkbox"] {
  opacity: 0;
  position: absolute;
  width: 24px;
  height: 24px;
  cursor: pointer;
}

.donate-form__agreement-step2 span {
  padding-left: 36px;
  position: relative;
  line-height: 1.3;
  font-size: 12px;
}

.donate-form__agreement-step2 span a {
  color: #da291c;
}
.donate-form__agreement-step2 span a:hover {
  text-decoration: none;
}

.donate-form__agreement-step2 label {
  cursor: pointer;
  margin-bottom: 0;
}

.donate-form__agreement-step2 label::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  background-color: #fff;
  transition:
    background-color 0.2s,
    border-color 0.2s;
}

.donate-form__agreement-step2
  input[type="checkbox"]:checked
  + span
  label::before {
  background-color: #fff;
  border-color: #da291c;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 11' fill='none'%3e%3cpath d='M1 5.5L5 9.5L13 1.5' stroke='%23DA291C' stroke-width='2'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 14px 11px;
}

.donate-form__agreement-step2 .form-error-message {
  width: 100%;
  flex: 1 0 0%;
}

/* Select2 Currency Styles */
.currency-flag {
  width: 20px;
  height: auto;
  margin-left: 8px;
  vertical-align: middle;
}

.select2-container--default .select2-selection--single {
  height: 38px !important;
  border: 1px solid #d9d9d9 !important;
  border-radius: 4px !important;
}

.select2-container--default
  .select2-selection--single
  .select2-selection__arrow {
  height: 36px !important;
}

.select2-container--default
  .select2-selection--single
  .select2-selection__rendered {
  line-height: 36px !important;
  padding-left: 12px !important;
}

.donate-section .iti--inline-dropdown .iti__dropdown-content {
  z-index: 3;
}
