﻿.textfield {
  position: relative;
  display: inline-block;
  margin: 0;
  margin-top: 16px;
  margin-bottom: 8px;
  padding-top: 12px;
  width: 300px;
  max-width: 100%;
  color: #212121;
}

.textfield__input,
.textfield__label {
  font-size: 16px;
  text-align: left;
  width: 100%;
    font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
    font-size: 14px;
    font-weight:500;
    line-height: 1.42857143;
    color: #333;
}

.textfield__input {
  display: block;
  margin: 0;
  outline: 0;
  border: none;
    
  border-bottom: 1px solid #aaa;
  background: transparent;
  padding: 8px 0;
}

.textfield__label {
  display: block;
  position: absolute;
  top: 20px;
  bottom: -5px;
  overflow: hidden;
  white-space: nowrap;
  pointer-events: none;
  color: #666;
}


.textfield__label:after {
  visibility: hidden;
  position: absolute;
  left: 45%;
  bottom: 0;
  background-color: #03A9F4;
  width: 10px;
  height: 2px;
  content: '';
  -webkit-transition-duration: 0.2s;
          transition-duration: 0.2s;
  -webkit-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
          transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.textfield--floatingLabel .textfield__label {
  -webkit-transition-duration: 0.2s;
          transition-duration: 0.2s;
  -webkit-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
          transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}


.textfield--floatingLabel .textfield__input:valid + .textfield__label,
.textfield--floatingLabel .textfield__input:focus + .textfield__label,
.textfield--floatingLabel .textfield__input:invalid + .textfield__label
{
  visibility: visible;
  top: 0;
  text-transform:  uppercase;
    font-weight: 600;
  font-size: 11px;
}

.textfield--floatingLabel .textfield__input:focus + .textfield__label {
  color: #03A9F4;
}

.textfield--floatingLabel .textfield__input:focus + .textfield__label:after {
  visibility: visible;
  left: 0;
  width: 100%;
}