/***********************************************************************************
Label flotantes 
https://es.stackoverflow.com/questions/93886/label-flotante-en-elemento-select
***********************************************************************************/


input[type="text"][required]:focus + label[placeholder]:before,
input[type="tel"][required]:focus + label[placeholder]:before,
select[required]:focus + label[placeholder]:before,
input[type="password"][required]:focus + label[placeholder]:before
{
    color: #8c8c8c;
}
input[type="text"]:focus + label[placeholder]:before,
input[type="text"][required]:focus + label[placeholder]:before,
input[type="tel"][required]:focus + label[placeholder]:before,
input[type="number"][required]:focus + label[placeholder]:before,
input[type="text"]:valid + label[placeholder]:before,
input[type="text"][required]:valid + label[placeholder]:before,
input[type="tel"][required]:valid + label[placeholder]:before,
input[type="number"][required]:valid + label[placeholder]:before,
select[required]:focus + label[placeholder]:before,
select[required]:valid + label[placeholder]:before,
input[type="password"][required]:focus + label[placeholder]:before,
input[type="password"][required]:valid + label[placeholder]:before
{
    -webkit-transition-duration: .2s;
    transition-duration: .2s;
    -webkit-transform: translate(-0.5em, -1.5em) scale(0.9, 0.9);
    transform: translate(-0.5em, -1.5em) scale(0.9, 0.9);
}
input[type="text"]:invalid + label[placeholder][alt]:before,
input[type="text"][required]:invalid + label[placeholder][alt]:before,
input[type="tel"][required]:invalid + label[placeholder][alt]:before,
input[type="number"][required]:invalid + label[placeholder][alt]:before,
select[required]:invalid + label[placeholder][alt]:before,
input[type="password"][required]:invalid + label[placeholder][alt]:before{
  content: attr(alt);
}
input[type="text"] + label[placeholder],
input[type="text"][required] + label[placeholder],
input[type="tel"][required] + label[placeholder],
input[type="number"][required] + label[placeholder],
select[required] + label[placeholder],
input[type="password"][required] + label[placeholder]{
  display: block;
  pointer-events: none;
  line-height: 1em;
  margin-top: calc(-1.5em - 2px);
  margin-bottom: calc((3em - 1em) + 2px);
  font-size: 1em;
  font-weight: normal;
}


input[type="text"] + label[placeholder]:before,
input[type="text"][required] + label[placeholder]:before,
input[type="tel"][required] + label[placeholder]:before,
input[type="number"][required] + label[placeholder]:before,
select[required] + label[placeholder]:before,
input[type="password"][required] + label[placeholder]:before{
  content: attr(placeholder);
  display: inline-block;
  margin: 0;
  padding: 0 4px;
  color: #9C9C9C;
  white-space: nowrap;
  -webkit-transition: 0.3s ease-in-out;
  transition: 0.3s ease-in-out;
  background-image: -webkit-linear-gradient(top, #fff, #fff);
  background-image: linear-gradient(to bottom, #fff, #fff);
  background-size: 100% 5px;
  background-repeat: no-repeat;
  background-position: center;
}