.tm-refform {
  font-family: var(--tm-font-sans);
  color: var(--tm-color-text);
  background-color: white;
  display: flex;
  flex-direction: column;
  gap: var(--tm-space-4);
  padding: clamp(1.5rem, 6vw, 4rem);
  max-width: 40rem;
  border-radius: 1rem;
  box-shadow: 0 3px 20px 0 rgba(0, 0, 0, 0.12);
}

.tm-refform[hidden] {
  display: none;
}

.tm-refform__section-heading {
  display: flex;
  flex-direction: column;
  gap: var(--tm-space-1);
  margin-bottom: var(--tm-space-3);
}

.elementor .tm-refform__section-title {
  margin: 0;
  font-family: var(--tm-font-serif);
  font-size: var(--tm-text-h3);
  font-weight: 400;
  line-height: 1.333;
  color: var(--tm-color-coral);
}

.tm-refform__section-subtitle {
  margin: 0;
  font-family: var(--tm-font-sans);
  font-size: var(--tm-text-eyebrow);
  font-weight: 600;
  line-height: 1.429;
  color: var(--tm-color-navy);
}

.tm-refform__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr));
  gap: var(--tm-space-4);
}

.tm-refform__field {
  display: flex;
  flex-direction: column;
  gap: var(--tm-space-2);
}

.tm-refform__field .mf-input-wrapper {
  display: flex;
  flex-direction: column;
  gap: var(--tm-space-2);
  position: relative;
}

.mf-select__native {
  display: none;
}

.mf_select__control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--tm-space-2);
  cursor: pointer;
  user-select: none;
}

.mf_select__control.mf-invalid {
  border-color: var(--tm-color-danger);
}

.mf_select__control--is-disabled {
  cursor: not-allowed;
  opacity: 0.55;
  background-color: var(--tm-color-panel);
}

.mf_select__value-container {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mf_select__placeholder {
  color: var(--tm-color-text-muted);
}

.mf_select__indicators {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.mf_select__indicator {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 5px 4px 0;
  border-color: var(--tm-color-text-muted) transparent transparent;
}

.mf_select__control--is-menu-open .mf_select__indicator {
  border-width: 0 4px 5px;
  border-color: transparent transparent var(--tm-color-text-muted);
}

.mf_select__menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 20;
  margin-top: var(--tm-space-1);
  background: var(--tm-color-white);
  border: 1px solid var(--tm-color-border);
  border-radius: var(--tm-radius);
  box-shadow: 0 8px 24px 0 rgba(0, 0, 0, 0.12);
  max-height: 14rem;
  overflow-y: auto;
}

.mf_select__menu-list {
  list-style: none;
  margin: 0;
  padding: var(--tm-space-1) 0;
}

.mf_select__option {
  padding: 0.6rem 0.9rem;
  cursor: pointer;
  color: var(--tm-color-text);
}

.mf_select__option:hover,
.mf_select__option--is-focused {
  background-color: var(--tm-color-cloud-wash);
}

.mf_select__option--is-selected {
  background-color: var(--tm-form-accent);
  color: var(--tm-color-white);
}

.tm-refform__label {
  font-weight: 600;
  font-size: var(--tm-text-small);
  color: var(--tm-color-navy);
}

.tm-refform__required {
  color: var(--tm-color-coral);
}

.tm-refform__input {
  width: 100%;
  font-family: inherit;
  font-size: var(--tm-text-body);
  color: var(--tm-color-navy);
  background: var(--tm-color-white);
  border: 1px solid var(--tm-color-border);
  border-radius: var(--tm-radius);
  padding: var(--tm-space-3) var(--tm-space-4);
}

.tm-refform__input:focus {
  outline: none;
  border-color: var(--tm-form-accent);
}

.tm-refform__input.mf-invalid {
  border-color: var(--tm-color-danger);
}

.tm-refform__field-error {
  margin: 0;
  color: var(--tm-color-danger);
  font-size: var(--tm-text-small);
}

.tm-refform__consent {
  display: flex;
  align-items: flex-start;
  gap: var(--tm-space-3);
  font-size: var(--tm-text-body);
}

.tm-refform__consent label {
  font-size: var(--tm-text-eyebrow);
  font-weight: normal;
  line-height: 1.5;
}

/* The Terms / Privacy links sit inside a run of navy consent copy. Brand link blue
 * against that navy is only 2.66:1, under the 3:1 that axe's `link-in-text-block`
 * wants before it will accept color as the sole cue — so the links are underlined
 * instead of relying on hue. Keeping the blue (rather than darkening it) leaves the
 * form's blue interactive language intact; see --tm-link-blue in foundations.css. */
.tm-refform__consent label a {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.tm-refform__checkbox {
  width: 1.15em;
  height: 1.15em;
  margin: 0.15em 0 0;
  flex: 0 0 auto;
}

.tm-refform__error {
  margin: 0;
  color: var(--tm-color-danger);
  font-size: var(--tm-text-small);
  font-weight: 600;
}

.tm-refform__actions {
  margin-top: var(--tm-space-2);
}

.tm-refform--sent {
  gap: var(--tm-space-3);
}

.tm-refform__sent-title {
  margin: 0;
  font-family: var(--tm-font-serif);
  font-size: var(--tm-text-h3);
  line-height: 1.2;
  color: var(--tm-color-navy);
}

.tm-refform__sent-body {
  margin: 0;
  color: var(--tm-color-text-muted);
}
