.field,
.group {
  position: relative;
  border-bottom: 1px solid var(--border-color);
  background: white;
  --paddingTop: 50px;

  label,
  .error {
    position: absolute;
    line-height: 1;
    display: block;
  }

  label {
    top: 25px;
    left: 33px;
    color: var(--light-body-color);
    font-weight: bold;
    font-size: 15px;
    padding-right: 80px;
    pointer-events: none;
  }

  .error {
    font-size: 12px;
    right: 29px;
    left: auto;
    top: 22px;
    text-align: right;
    background: var(--accent-color);
    padding: 3px 5px;
    border-radius: 4px;
    color: white;
    font-weight: bold;
  }

  &:hover .error {
    opacity: 0.3;
  }
}

.group {
  padding: 25px;

  label {
    padding-bottom: 15px;
  }
}

.fieldArray {
  .fieldArrayItem {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
  }

  .fieldArrayItemField {
    margin-right: 20px;
  }

  .fieldArrayButton {
    background: var(--light-bg-color);
    color: inherit;
    display: inline-block;
    padding: 0.4em 0.5em;
    font-weight: bold;
    font-family: var(--font-sans);
    border-radius: 3px;
    border: 1px solid var(--light-bg-color);
    font-size: 15px;
    transition: opacity 150ms ease-in-out;
    cursor: pointer;
    text-decoration: none;

    &:hover {
      opacity: 0.8;
    }
  }

  input {
    border: 0;
    margin: 0;
    padding: 5px 0;
    background-color: white;
    font-size: 17px;
    display: block;
    box-sizing: border-box;
    width: 100%;
    appearance: none;
    box-shadow: none;
    border-bottom: 1px solid var(--border-color);

    &:focus {
      outline: none;
      border-bottom-color: var(--azure-color);
    }

    &::placeholder {
      color: var(--extra-light-body-color);
    }
  }

  select {
    width: 100%;
    border: 0;
    background: transparent;
    appearance: none;
    box-shadow: none;
    font-size: inherit;
    padding: 3px 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
  }
}

.field {
  .selectPlaceholder {
    position: absolute;
    top: var(--paddingTop);
    left: 32px;
    right: 30px;
    font-size: rfs(17px);
    color: var(--extra-light-body-color);
    opacity: 0.6;
    pointer-events: none;
  }

  select,
  input,
  textarea {
    border: 0;
    margin: 0;
    background-color: white;
    padding: var(--paddingTop) 29px 20px;
    font-family: inherit;
    font-size: 17px;
    display: block;
    box-sizing: border-box;
    width: 100%;
    border-left: 4px solid transparent;
    appearance: none;
    box-shadow: none;

    &:focus {
      outline: none;
      border-left-color: var(--azure-color);
    }

    &::placeholder {
      color: var(--extra-light-body-color);
    }
  }

  textarea {
    min-height: 150px;
    max-height: 300px;
  }
}

.submit {
  padding: 20px 29px;

  @media (width > 900px) {
    display: flex;
    align-items: center;
  }
}

.anchor {
  position: relative;
  top: -80px;
}

.agree {
  flex: 1;
  font-size: 13px;
  color: var(--light-body-color);

  @media (width <= 900px) {
    margin-bottom: 15px;
  }

  @media (width > 900px) {
    margin-right: 50px;
    margin-bottom: 0;
  }

  a {
    color: inherit;
  }
}

.required {
  color: var(--accent-color);
}
