.field {
  position: relative;
  margin-bottom: 35px;
}

.field__label {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.field__label-text {
  @include mainBodyText;
  margin-bottom: 25px;

  @media (max-width: $mobile) {
    margin-bottom: 20px;
  }

  .login-page & {
    @media (max-width: $mobile) {
      min-height: 38px;
    }
  }
}

.field__input {
  display: block;
  box-sizing: border-box;
  padding: 0 20px;
  width: 300px;
  max-width: 100%;
  height: 50px;
  font-family: inherit;
  font-weight: 500;
  text-align: center;
  font-size: 17px;
  line-height: 36px;
  color: $text-main;
  background-color: $bg-accent;
  border: 1px solid rgba(208, 209, 209, 0.8);
  border-radius: 25px;
  transition: all 0.3s ease;

  @media (max-width: $mobile) {
    font-weight: 400;
    font-size: 16px;
    -webkit-appearance: none;
  }

  &::placeholder {
    color: $gray-medium;
  }

  &:hover {
    background-color: #F2F2F2;
    border-color: #D7D8D7;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
  }

  &:focus {
    background-color: $bg-accent;
    border-color: #D7D8D7;
    box-shadow: none;
    outline: none;

    &::placeholder {
      color: rgba(201, 199, 199, 0.5);
    }
  }

  .field--invalid & {
    color: $red;
    background-color: rgba(255, 0, 0, 0.1);
    border-color: $red;
  }
}

.field__error-message {
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translate(-50%, 5px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 800px;
  max-width: calc(100% + 60px);
  min-height: 32px;
  font-size: 16px;
  line-height: 1;
  color: $red;

  @media (max-width: $mobile) {
    transform: translate(-50%, 9px);
    font-size: 12px;
    line-height: 17px;
    letter-spacing: 0.01em;
  }
}

.field__phone-display, .field__phone-hidden {
  white-space: pre;
}

.field__phone-hidden {
  opacity: 0;
  background: #27EF60;
}
.field__phone-display, .field__phone-placeholder {
  position: absolute;
  box-sizing: border-box;
  padding: 0;
  width: 300px;
  max-width: 100%;
  height: 50px;
  font-weight: 500;
  text-align: center;
  font-size: 17px;
  line-height: 36px;
  color: #000000;
  margin: 6px 0;
}

.field__phone-placeholder {
  font-weight: 500;
  margin: 6px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  visibility: hidden;
  color: $gray-medium
}
.field__phone-placeholder__visible {
  visibility: visible;
}