work2

HTML

<div id="elements">
  <div class="els" style="background:#00bfff">
    <div class="number" style="">1</div>
    <input type="text" class="things">
    <div class="clear"></div>
  </div>
</div>

CSS

#elements {
  overflow: auto;
  background: #1d1e2e;
}
#elements .els {
  margin: 0 auto 10px auto;
  overflow: auto;
  box-sizing: border-box;
  padding: 10px;
  border-radius: 15px;
  width: auto;
  max-width: 400px;
  display: flex;
}
#elements .els .number,
#elements .els input {
  float: left;
}
#elements .els .number {
  font-size: 20px;
  color: #dedede;
  width: 25px;
  height: 25px;
  padding: 5px;
  border-radius: 100px;
  line-height: 25px;
  margin: 0 10px 0 5px;
  background: rgba(0, 0, 0, 0.25);
}

#elements .els input {
  line-height: 29px;
  flex: 1;
  min-width: 0;
  box-sizing: border-box;
  border: none;
  background-image: none;
  background-color: transparent;
  -webkit-box-shadow: none;
  -moz-box-shadow: none;
  box-shadow: none;
  padding: 3px 0 1px 0;
  font-size: 20px;
  color: #dedede;
}
#elements .els .clear {
  clear: both;
  display: none;
}

@media only screen and (max-width: 400px) {
  .els {
    width: auto !important;
  }
  .els:focus-within,
  .els:hover {
    transition: none;
    width: 0;
  }
}