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

.form-label-group.floating-label > input,
.form-label-group.floating-label > textarea,
.form-label-group.floating-label > select,
.form-label-group.floating-label > label {
    height: 3.125rem;
    padding: .75rem;
}

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

.form-label-group.floating-label input::-webkit-input-placeholder,
.form-label-group.floating-label select::-webkit-input-placeholder,
.form-label-group.floating-label textarea::-webkit-input-placeholder,

.form-label-group.floating-label input:-ms-input-placeholder,
.form-label-group.floating-label select:-ms-input-placeholder,
.form-label-group.floating-label textarea:-ms-input-placeholder,

.form-label-group.floating-label input::-ms-input-placeholder,
.form-label-group.floating-label select::-ms-input-placeholder,
.form-label-group.floating-label textarea::-ms-input-placeholder,

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

.form-label-group.floating-label input::placeholder,
.form-label-group.floating-label select::placeholder,
.form-label-group.floating-label textarea::placeholder {
    color: transparent;
}

.form-label-group.floating-label input:not(:placeholder-shown),
.form-label-group.floating-label select:not(:placeholder-shown),
.form-label-group.floating-label textarea:not(:placeholder-shown) {
    padding-top: 1.25rem;
    padding-bottom: .25rem;
}

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

.form-label-group.floating-label input:focus ~ label,
.form-label-group.floating-label select:focus ~ label,
.form-label-group.floating-label textarea:focus ~ label {
    color: #9c27b0;
}

/* Fallback for Edge
-------------------------------------------------- */
@supports (-ms-ime-align: auto) {
    .form-label-group.floating-label > label {
        display: none;
    }
    .form-label-group.floating-label input::-ms-input-placeholder,
    .form-label-group.floating-label select::-ms-input-placeholder,
    .form-label-group.floating-label textarea::-ms-input-placeholder {
        color: #777;
    }
}

/* Fallback for IE
-------------------------------------------------- */
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
    .form-label-group.floating-label > label {
        display: none;
    }
    .form-label-group.floating-label input:-ms-input-placeholder,
    .form-label-group.floating-label select:-ms-input-placeholder,
    .form-label-group.floating-label textarea:-ms-input-placeholder {
        color: #777;
    }
}