.form_saved_message h2 {
  font-weight: 600;
  font-size: 1.4em;
}
.resume_form_link_wrapper a {
  text-decoration: underline;
  margin: 10px 0;
  display: block;
}

div.form_saved_message_emailform {
  margin-top: 10px;
}

div.form_saved_message_emailform form {
  display: flex;
  align-items: flex-end;
}

div.form_saved_message_emailform form>div {
  min-width: 580px;
  margin-right: 10px;
}

div.form_saved_message_emailform form input[type="email"] {
  width: 100%;
}

/* Removes empty space when we generate dynamic empty html blocks */
.gfield.gfield--type-html:has(.wicket-gf-dynamic-hidden-html) {
  display: contents;
}

@media(max-width:767px) {
  .wicket-gf-shortcode {
    padding-left: 10px;
    padding-right: 10px;
  }

}

body:not(.wicket-theme-v2) .gform_wrapper {

  /* Style for choice-based inputs (radio, checkbox, consent) */
  .gfield--type-choice {
    .ginput_container_radio ul.gfield_radio li.gchoice,
    .ginput_container_checkbox ul.gfield_checkbox li.gchoice,
    .ginput_container_consent {
      display: flex;
      align-items: flex-start; /* Aligns items to the top, better for long text */
      margin-bottom: 0.5rem; /* Space between options */
    }

    .ginput_container_radio ul.gfield_radio li.gchoice input[type="radio"],
    .ginput_container_checkbox ul.gfield_checkbox li.gchoice input[type="checkbox"],
    .ginput_container_consent input[type="checkbox"] {
      margin-top: 0.15em; /* Adjust vertical alignment of the input */
      margin-right: 0.75rem; /* Space between input and label */
    }

    .ginput_container_radio ul.gfield_radio,
    .ginput_container_checkbox ul.gfield_checkbox {
      list-style: none;
      padding-left: 0;
      margin-left: 0;
    }

    /* Justify label text */
    .ginput_container_radio ul.gfield_radio li.gchoice label,
    .ginput_container_checkbox ul.gfield_checkbox li.gchoice label,
    .ginput_container_consent .gfield_consent_label {
      text-align: justify;
    }
  }

  .gf_page_steps {
    .gf_step:not(.gf_step_hidden) {
      margin: 8px 32px 8px 0;
      display: flex !important;

      &:not(.gf_step_hidden) .gf_step_number {
        border-width: var(--border-interactive-md, 2px);
        max-height: 40px;
        max-width: 40px;
        min-width: 40px;
        min-height: 40px;
        align-content: center;
      }

      .gf_step_label {
        line-height: var(--wp--preset--font-size--medium, 22px);
        align-content: center;
      }
    }
  }

  .component-org-search-select  {
    .component-org-search-select__results {
      background-color: transparent !important;

      .component-org-search-select__search-container {
        background-color: transparent !important;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE/Edge */
      }
      .component-org-search-select__search-container::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
      }
    }
  }

  /* New Wicket GF Step Styles - Vertical Layout */
  .gf_page_steps {
    flex-direction: column;
    align-items: flex-start;
    border-bottom: none;
    padding: 0 1rem 0 0;
    min-width: 380px;
  }

  .gf_step {
    flex-direction: row !important;
    align-items: center;
    padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--50);
    margin: 0 0 var(--wp--preset--spacing--20) 0 !important;
    width: 100%;
    border-bottom: none;
    position: relative;
    background-color: transparent;
    border-radius: 20px;
  }

  .gf_step .gf_step_number {
    border-radius: 50% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px !important;
    font-weight: 600 !important;
    line-height: 1;
    border-width: 2px !important;
    border-style: solid !important;
  }

  .gf_step .gf_step_label {
    font-size: 18px;
    margin-left: var(--wp--preset--spacing--50);
    font-weight: 600;
  }

  /* Pending State */
  .gf_step_pending .gf_step_number {
    background-color: var(--wp--preset--color--white) !important;
    border-color: var(--wp--preset--color--pale-cyan-blue) !important;
    color: var(--wp--preset--color--vivid-cyan-blue) !important;
  }

  .gf_step_pending .gf_step_label {

  }

  /* Completed State */
  .gf_step_completed {
    background-color: var(--wp--preset--color--white);

    .gf_step_number {
      background: transparent !important;
      border-color: transparent !important;
      color: transparent !important;
      position: relative;
    }

    .gf_step_number::before {
      content: '' !important;
      position: absolute !important;
      top: 0 !important;
      left: 0 !important;
      width: 100% !important;
      height: 100% !important;
      background: var(--wp--preset--gradient--midnight) !important;
      border: none !important;
      border-radius: 50% !important;
    }
  }

  .gf_step_completed .gf_step_number::after {
    content: '✓';
    color: var(--wp--preset--color--white);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    line-height: 1;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background-color: transparent !important;
  }

  .gf_step_completed .gf_step_label {
  }

  /* Active State */
  .gf_step_active {
    background-color: color-mix(in srgb, var(--wp--preset--color--cyan-bluish-gray), transparent 70%);
  }

  .gf_step_active .gf_step_number {
    background-color: var(--wp--preset--color--white) !important;
    border-color: var(--wp--preset--color--vivid-cyan-blue) !important;
    color: var(--wp--preset--color--vivid-cyan-blue) !important;
    border-width: 3px !important;
  }

  .gf_step_active .gf_step_label {
    color: var(--wp--preset--gradient--midnight);
  }
}

/* Ensure GF multi-step controls show interactive cursor */
.gform_wrapper .gform-page-footer input.gform_previous_button,
.gform_wrapper .gform-page-footer input.gform_next_button:not(.gform_hidden):not([hidden]),
.gform_wrapper .gform-page-footer input.gform_submit_button,
.gform_wrapper .gform-page-footer input.gform_button,
.gform_wrapper .gform-page-footer input[type="submit"].gform_button,
.gform_wrapper .gform-page-footer input[data-submission-type="previous"],
.gform_wrapper .gform-page-footer input[data-submission-type="next"],
.gform_wrapper .gform-page-footer input[data-submission-type="submit"],
.gform_wrapper .gform_footer input.gform_button,
.gform_wrapper .gform_footer button.gform_button {
  cursor: pointer !important;
}

.gform_wrapper .gform-page-footer input[disabled],
.gform_wrapper .gform_footer input[disabled],
.gform_wrapper .gform_footer button[disabled] {
  cursor: not-allowed !important;
}

/* Multi-step tracker: keep the step number a fixed circle regardless of label length.
   On wicket-theme-v2 the plugin's own stepper block above (scoped to
   body:not(.wicket-theme-v2)) does not apply; Gravity Forms' "gravity-theme" styles the
   number as `display: table-cell`, so it stretches to the table-row height whenever the
   step label wraps to multiple lines, distorting the circle into an oval. Take the step
   out of table layout: make it a flex row so the number is a fixed, non-stretching 40px
   circle and the label wraps independently (number top-aligned with the first label line). */
.gform_wrapper.gravity-theme .gf_step {
  display: flex !important;
  align-items: flex-start !important;
}
.gform_wrapper.gravity-theme .gf_step .gf_step_number {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 40px !important;
  width: 40px !important;
  height: 40px !important;
  aspect-ratio: 1 / 1 !important;
  box-sizing: border-box !important;
}
.gform_wrapper.gravity-theme .gf_step .gf_step_label {
  display: block !important;
}
