body::before {
    display: block;
    content: '';
    height: 20px;
}

.search-bar {
    width: 50px;
    transition: width 300ms cubic-bezier(0.18, 0.89, 0.34, 1.09);
    overflow: hidden;
}

.search-input {
    opacity: 0;
    outline: none;
    cursor: pointer;
    width: 245px;
    font-weight: bolder;
}

.search-submit {
    cursor: pointer;
    width: 40px;
    height: 40px;
    background: transparent;
    color: #f8f9fa;
    transition: background 300ms ease-in-out;
}

.search-bar-container {
    width: 35%;
}

.search-bar:focus {
    outline: 0;
}

.search-bar:focus-within {
    width: 300px;

}

.search-bar:focus-within .search-submit{
    background: rgb(255, 255, 255);
    color: black;
}

.search-bar:focus-within .search-input{
    opacity: 1;
    cursor: initial;
}

::placeholder { /* Chrome, Firefox, Opera, Safari 10.1+ */
    color: rgb(255, 255, 255);
    opacity: 1; /* Firefox */
  }

  .search-bar:focus-within .search-submit, .search-submit:hover {
      outline: none;
      box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  }