.searchForm {
  display: flex;
  align-items: flex-start;
  padding-left: 45px;
  width: 470px;
  height: 100%;
  box-sizing: border-box;
}

.searchBar {
  margin: auto auto auto 0;
  display: block;
  height: 35px;
  width: 145px;
  padding-left: 25px;
  padding-right: 15px;
  border-radius: 7px;
  border: none;
  outline: none;
  background-color: #bbb;
  box-sizing: border-box;
  transition: 0.4s ease;
  color: black;
  font-size: 12px;
}

.searchBar::placeholder {
  color: black;
  opacity: 1;
}

.searchForm:focus-within .searchBar {
  background-color: #fff;
  width: 330px;
}

.searchBarHasValue {
  width: 330px;
}

.searchBar:hover {
  cursor: text;
  background-color: #fff;
}

.searchButtonContainer {
  margin: auto 0 auto auto;
  overflow: hidden;
}

.submitSearchButton {
  transform: translateX(-100px);
  font-size: 12px;
  font-weight: bold;
}

.searchBar:focus + .searchButtonContainer > button,
.searchBar:hover + .searchButtonContainer > button {
  background-color: #fb1;
}

.visibleButton {
  transform: translateX(0);
}

.searchCompletionWrapper {
  position: absolute;
  top: 60px;
  width: 330px;
  display: none;
  flex-direction: column;
  border-radius: 7px;
  overflow: hidden;
  border: 1px #383f41 solid;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
}

.searchForm:focus-within .searchCompletionWrapper {
  display: flex;
  animation: fadeInFromNone 0.5s ease-out;
  display: flex;
}

.searchCompleteItem {
  position: relative;
  background-color: #151d20;
  border-bottom: 1px #383f41 solid;
  width: 100%;
  height: 35px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: 0.2s ease-out;
}

.searchCompleteItem:hover a,
.selectedItem a {
  color: white;
}

.searchCompleteItem:hover,
.searchCompleteItem:focus-within,
.selectedItem {
  background-color: #2f3638;
}

.searchCompletionWrapper .searchCompleteItem:last-child {
  border-bottom: none;
}

.searchCompleteItem a {
  display: inline-block;
  width: 100%;
  height: 100%;
  text-decoration: none;
  padding-left: 25px;
  color: #bbb;
  padding-top: 10px;
  padding-bottom: 10px;
  box-sizing: border-box;
}

.searchCompleteItem button {
  position: absolute;
  right: 12px;
  outline: none;
  height: 100%;
  color: white;
}

@keyframes fadeInFromNone {
  /* https://stackoverflow.com/questions/8449933/animation-css3-display-opacity/8450102 */
  0% {
    display: none;
    opacity: 0;
  }

  1% {
    display: flex;
    opacity: 0;
  }

  100% {
    display: flex;
    opacity: 1;
  }
  101% {
    display: flex;
  }
}
