/* The site's forms (partials/forms/form.php). Two classes deep on purpose:
   fourwalls.css styles every input[type=text] and textarea globally. */

.fw-form {
  max-width: 984px;
  margin: 0 0 40px;
  scroll-margin-top: 140px; /* links to #fw-form land below the fixed header */
}

/* Headings between groups of fields (Realtor Referral). */
.fw-form .fw-form__section {
  margin: 40px 0 16px;
}

.fw-form .fw-form__section:first-of-type {
  margin-top: 0;
}

.fw-form .fw-form__field {
  margin: 0 0 24px;
}

.fw-form .fw-form__label {
  display: block;
  margin: 0 0 8px;
  font: 700 15px/1.3 var(--fw-font-body);
  color: var(--fw-grey-dark);
}

.fw-form .fw-form__input {
  display: block;
  width: 100%;
  margin: 0;
  padding: 12px 16px;
  box-sizing: border-box;
  border: 1px solid var(--fw-grey-light);
  border-radius: 0;
  background: var(--fw-white);
  color: var(--fw-dark);
  font: 400 18px/1.4 var(--fw-font-body); /* 16px+ stops iOS zooming in on focus */
  appearance: none;
}

.fw-form textarea.fw-form__input {
  min-height: 200px;
  resize: vertical;
}

.fw-form .fw-form__input::placeholder {
  color: var(--fw-grey);
  opacity: 1;
}

.fw-form .fw-form__input:focus {
  border-color: var(--fw-dark);
  outline: 2px solid var(--fw-dark);
  outline-offset: 0;
}

.fw-form .fw-form__input[aria-invalid="true"] {
  border-color: var(--fw-error);
}

.fw-form .fw-form__check {
  position: relative;
  display: grid;
  grid-template-columns: 24px 1fr;
  column-gap: 12px;
  align-items: start;
}

.fw-form .fw-form__box {
  width: 24px;
  height: 24px;
  margin: 1px 0 0;
  accent-color: var(--fw-dark);
  cursor: pointer;
}

.fw-form .fw-form__box:focus-visible {
  outline: 2px solid var(--fw-dark);
  outline-offset: 2px;
}

.fw-form .fw-form__check-label {
  font: 400 13px/1.5 var(--fw-font-body);
  color: var(--fw-grey-dark);
  cursor: pointer;
}

/* A 44px tap area around the box; it belongs to the label, so a tap ticks the box. */
.fw-form .fw-form__check-label::before {
  content: "";
  position: absolute;
  top: -9px;
  left: -10px;
  width: 44px;
  height: 44px;
}

.fw-form .fw-form__check-label a {
  color: inherit;
  text-decoration: underline;
}

.fw-form .fw-form__check .fw-form__error {
  grid-column: 1 / -1;
}

.fw-form .fw-form__error {
  margin: 0;
  padding: 0;
  font: 400 15px/1.4 var(--fw-font-body);
  color: var(--fw-error);
}

.fw-form .fw-form__error:not(:empty) {
  margin-top: 8px;
}

/* Address suggestions (js/forms.js, initAddress): a list under the field,
   like the landing page's. */
.fw-form .fw-form__field--suggest {
  position: relative;
}

.fw-form .fw-suggest {
  position: absolute;
  z-index: 5;
  left: 0;
  right: 0;
  margin-top: 4px;
  border: 1px solid var(--fw-grey-light);
  background: var(--fw-white);
  box-shadow: 0 8px 24px rgba(50, 51, 51, 0.14);
}

.fw-form .fw-suggest__list {
  margin: 0;
  padding: 4px 0;
  list-style: none;
}

.fw-form .fw-suggest__option {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 10px 16px;
  cursor: pointer;
  font: 400 16px/1.3 var(--fw-font-body);
  color: var(--fw-dark);
}

.fw-form .fw-suggest__option[aria-selected="true"],
.fw-form .fw-suggest__option:hover {
  background: #f2f2f2;
}

.fw-form .fw-suggest__main {
  font-weight: 500;
}

.fw-form .fw-suggest__rest {
  font-size: 14px;
  color: var(--fw-grey-dark);
}

.fw-form .fw-suggest__credit {
  padding: 6px 16px 8px;
  border-top: 1px solid var(--fw-grey-light);
  font: 400 12px/1.4 var(--fw-font-body);
  color: var(--fw-grey);
  text-align: right;
}

.fw-form .fw-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.fw-form .fw-form__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.fw-form .fw-form__turnstile:not(:empty) {
  margin: 0 0 24px;
}

.fw-form .fw-form__submit {
  min-height: 48px;
  border: 0;
}

.fw-form .fw-form__submit:disabled {
  cursor: wait;
  background-color: var(--fw-grey-dark);
}

.fw-form .fw-form__status {
  margin: 16px 0 0;
  padding: 0;
  font: 400 16px/1.5 var(--fw-font-body);
  color: var(--fw-error);
}

.fw-form .fw-form__status:empty {
  display: none;
}

.fw-form__done {
  margin: 0 0 40px;
  font: 400 18px/1.8 var(--fw-font-body);
  letter-spacing: .1px;
  color: var(--fw-dark);
}

/* Keeps the page from jumping far up when the form is swapped for the thank-you text. */
@media (min-width: 481px) {
  .fw-form__done {
    min-height: 320px;
  }
}

/* Lines up with the page's paragraphs, which phones indent by 10px. */
@media (max-width: 480px) {
  .fw-form__done {
    padding-left: 10px;
  }
}

.fw-form__done:focus {
  outline: none;
}
