$floating-input-padding-y : $input-padding-y;
$floating-input-padding-x : $input-padding-x;

.form-label-group {
  position: relative;
  margin-bottom: 1rem;
}

.form-label-group > input,
.form-label-group > textarea,
.form-label-group > label {
  padding: $floating-input-padding-y $floating-input-padding-x;
}

.form-label-group > label {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  margin-bottom: 0; /* Override default `<label>` margin */
  line-height: 1.5;
  color: #989898;
  border: 1px solid transparent;
  border-radius: .25rem;
  transition: all .1s ease-in-out;
  font-weight: normal;
  cursor: text;
  pointer-events: none;
}

.form-label-group input::-webkit-input-placeholder,
.form-label-group input:-ms-input-placeholder,
.form-label-group input::-ms-input-placeholder,
.form-label-group input::-moz-placeholder,
.form-label-group input::placeholder,

.form-label-group textarea::-webkit-input-placeholder,
.form-label-group textarea:-ms-input-placeholder,
.form-label-group textarea::-ms-input-placeholder,
.form-label-group textarea::-moz-placeholder,
.form-label-group textarea::placeholder{
  color: transparent;
}

.form-label-group input:not(:placeholder-shown),
.form-label-group textarea:not(:placeholder-shown){
  padding-top: $floating-input-padding-y + $floating-input-padding-y * (2 / 3);
  padding-bottom: $floating-input-padding-y / 3;
  font-weight: 400;
}

.form-label-group input:not(:placeholder-shown) ~ label,
.form-label-group textarea:not(:placeholder-shown) ~ label {
  padding-top: $floating-input-padding-y / 3;
  padding-bottom: $floating-input-padding-y / 3;
  font-size: 12px;
  color: #777;
}
