/* Keep long contact details inside their column at every viewport width. */
.contact {
  grid-template-columns: .15fr minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
}

.contact-copy,
.contact-form,
.direct a,
.direct a div {
  min-width: 0;
}

.direct a div {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.contact-form {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

/* Reserve separate vertical space for the select's question and answer. */
.field select {
  min-height: 64px;
  padding: 1.85rem 2.25rem .45rem .2rem;
  line-height: 1.35;
}

.field select + label.fixed {
  top: .15rem;
  max-width: calc(100% - 1rem);
  line-height: 1.2;
  white-space: normal;
}

@media (max-width: 1120px) {
  .contact {
    grid-template-columns: 1fr 1fr;
  }

  .contact .section-label {
    grid-column: 1 / -1;
    writing-mode: initial;
    margin-bottom: 0;
  }

  .contact-copy,
  .contact-form {
    width: 100%;
  }
}

@media (max-width: 900px) {
  .contact {
    grid-template-columns: 1fr;
  }

  .contact .section-label {
    grid-column: auto;
  }
}

@media (max-width: 600px) {
  .contact-form {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   CBT HERTS CONTACT FORM SPACING FIX
   ========================================================= */

.contact-form {
  align-items: start;
  row-gap: 1.65rem;
}

.contact-form .field {
  position: relative;
  min-width: 0;
  min-height: 64px;
}

.contact-form .field input,
.contact-form .field select {
  display: block;
  width: 100%;
  min-height: 58px;
  padding: 1.55rem .2rem .55rem;
}

.contact-form .field textarea {
  display: block;
  width: 100%;
  min-height: 135px;
  padding: 1.65rem .2rem .65rem;
  resize: vertical;
}

.contact-form .field label {
  line-height: 1.2;
  white-space: normal;
}

.contact-form .field input:focus + label,
.contact-form .field input:not(:placeholder-shown) + label,
.contact-form .field textarea:focus + label,
.contact-form .field textarea:not(:placeholder-shown) + label,
.contact-form .field label.fixed {
  top: .15rem;
  font-size: .7rem;
  line-height: 1.2;
}

.contact-form .field select + label.fixed {
  top: .15rem;
}

.contact-form .form-note {
  display: block;
  position: static;
  margin: .15rem 0 0;
  padding: 0;
  line-height: 1.55;
}

.contact-form > .button.full {
  position: static;
  width: 100%;
  margin-top: .15rem;
  min-height: 52px;
}

@media (max-width: 600px) {
  .contact-form {
    grid-template-columns: 1fr;
    row-gap: 1.4rem;
  }

  .contact-form .field,
  .contact-form .field.full,
  .contact-form > .full,
  .contact-form .form-note {
    grid-column: 1 / -1;
  }

  .contact-form .field {
    min-height: 64px;
  }

  .contact-form .field.full {
    min-height: 145px;
  }
}

/* Align contact preference label with the telephone label. */
.contact-form #contact-method + label.fixed {
  top: 1.18rem;
}

.contact-form #contact-method {
  min-height: 78px;
  padding-top: 2.8rem;
}

/* Align the contact preference question with Telephone. */
.contact-form #contact-method + label.fixed {
  top: 1.18rem;
  font-size: 1rem;
  text-transform: none;
  letter-spacing: normal;
}

.contact-form #contact-method {
  min-height: 90px;
  padding: 3.6rem .2rem .55rem;
}

/* Move the contact preference down another 10px. */
.contact-form #contact-method + label.fixed {
  top: calc(1.18rem + 10px);
}

.contact-form #contact-method {
  min-height: 100px;
  padding-top: calc(3.6rem + 10px);
}

.contact-form #contact-method + label.fixed {
  top: calc(1.18rem + 20px);
}

.contact-form #contact-method {
  min-height: 110px;
  padding-top: calc(3.6rem + 20px);
}
