/* Estilos gerais para .label-float */
.label-float {
  position: relative;
  padding-top: 13px;
}

/* Estilos para inputs e selects dentro de .label-float */
.label-float input,
.label-float select {
  color: #525252;
  border: 1px solid lightgrey;
  border-radius: 5px;
  outline: none;
  min-width: 250px;
  padding: 15px 20px;
  font-size: 14px;
  transition: all 0.1s linear;
  -webkit-transition: all 0.1s linear;
  -moz-transition: all 0.1s linear;
  -webkit-appearance: none;
}

/* Estilos ao focar */
.label-float input:focus,
.label-float select:focus {
  border: 2px solid #4b0082;
}

/* Placeholder transparente */
.label-float input::placeholder,
.label-float select::placeholder {
  color: transparent;
}

/* Estilos para labels */
.label-float label {
  pointer-events: none;
  position: absolute;
  top: calc(50% - 8px);
  left: 15px;
  transition: all 0.1s linear;
  padding: 5px;
  box-sizing: border-box;
}

/* Estados de validação */
.label-float input:required:invalid + label,
.label-float select:required:invalid + label {
  color: #4b0082;
  background-color: #ffeae6;
}

.label-float input:focus:required:invalid,
.label-float select:focus:required:invalid {
  border: 2px solid #ffeae6;
}

.label-float input:required:invalid + label:before,
.label-float select:required:invalid + label:before {
  content: '*';
}

/* Labels flutuantes */
.label-float input:focus + label,
.label-float input:not(:placeholder-shown) + label,
.label-float select:focus + label,
.label-float select:not(:placeholder-shown) + label {
  font-size: 13px;
  top: 0;
  color: #4b0082;
  background-color: #e2ffe2;
}

/* Estilos específicos para select */
.label-float select {
  background-color: #fff;
  width: 100%;
}

/* Inputs read-only */
.label-float input:read-only {
  background-color: rgb(245, 237, 255);
}

/* Sobrescrevendo sr-only para .label-float */
.label-float label.sr-only {
  position: absolute;
  width: auto;
  height: auto;
  margin: 0;
  padding: 5px;
  overflow: visible;
  clip: auto;
  white-space: normal;
  transition: none;
  -webkit-transition: none;
  -moz-transition: none;
}
