.Demio-Input-container {
  border: 1px solid #DEE4E8;
  border-radius: 4px;
  overflow: hidden; 

  &:focus-within {
    border-color: #2C3336;
  }
}

.Demio-Input-field {
  input[type="text"],
  input[type="password"],
  input[type="email"],
  input[type="url"],
  input[type="tel"],
  textarea {
    text-align: left;
    list-style: none;
    position: relative;
    display: block;
    padding-left: 19px;
    padding-top: 2px;
    width: 100%;
    height: 48px;
    font-size: 14px !important;
    color: #2C3336;
    background-color: #fff;
    background-image: none;
    border: 0;
    -webkit-appearance: none;
    font-family: inherit;
    box-sizing: border-box;
    text-overflow: ellipsis;
    font-weight: normal;
    line-height: normal;

    &:focus {
      outline: none;
    }

    &:disabled {
      color: #B9BFC6;
    }
  }

  textarea {
    padding: 12px 19px;
    min-height: 88px;
  }

  label {
    display: block;
    position: relative;
    margin-bottom: 0;

    &:focus {
      outline: none;
    }
  }
}

.Demio-Input-label,
.Demio-Input-label-optional {
  color: #9FA6AD;
  position: absolute;
  top: -9px;
  z-index: 4;
  background: #fff;
  left: 8px;
  line-height: 17px;
  padding: 0 8px;
  font-size: 12px;
  letter-spacing: 0.4px;
  border-radius: 4px;
  font-weight: normal;
}

.Demio-Input-label-optional {
  left: auto;
  right: 14px;
  font-style: italic;
}

.Demio-Input-label {
  max-width: ~"calc(100% - 78px)";
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  top: -9px;
  height: 17px;
  display: none;
  line-height: 14px;
  align-items: center;

  &--visible {
    display: flex;
  }
}

.Demio-Input-field-hint {
  .Demio-Input-label-optional,
  .Demio-Input-label {
    color: #2C3336;
  }
  .Demio-Input-hint {
    color: #2C3336;
  }
}

.Demio-Input-field-hint,
.Demio-Input-field-invalid {
  .Demio-Input-error,
  .Demio-Input-hint {
    padding: 5px 8px 0;
    font-size: 12px;
    letter-spacing: 0.4px;
    border-radius: 4px;
    font-weight: normal;
    line-height: normal;
  }
}

.Demio-Input-field-invalid {
  .Demio-Input-error,
  .Demio-Input-label,
  .Demio-Input-label-optional {
    color: #EE4C3B;
  }

  .Demio-Input-container {
    border-color: #EE4C3B;
  }
  
}

.Demio-Input-error{
  display: flex;
  justify-content: space-between;
}

.Demio-Input-field-counter {
  text-align: right;
  margin-left: auto;
  white-space: pre;
}
