@import "layout.module.scss";
@import "playlist-item.module.scss";
@import "searchForm.module.css";

.mobileSearchbarWrapper {
  @extend .pageSectionWrapper;

  form {
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
    margin: 0;

    &:focus-within input,
    input { // Searchbar
      min-width: calc(100% - 70px - 20px);
      max-width: calc(100% - 70px - 20px);
    }

    button { // Submit Button
      transform: translateX(0);
    }

    > div:nth-child(3) { // Completion dropdown
      z-index: 10;
      width: calc(100% - 70px - 20px - 40px);
      text-align: left;
    }
  }
}

.recentSearchesTitle {
  @extend .sectionTitle;

  margin-top: 20px;
}

.emptySearchHistoryWrapper {
  @extend .contentWrapper;

  margin-top: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.deleteSearchButton {
  position: absolute;
  align-self: flex-end;
  top: 10px;
  right: 10px;
  padding: 0;
  transition: 0.2s linear;
  color: inherit;
  outline: none;
}

.deleteSearchButton:hover {
  transform: scale(1.2);
  color: white;
}

.searchHistoryList {
  @extend .gridLayout;

  margin-top: 30px;
  padding: 2rem 3rem;
}

.searchHistoryItemWrapper {
  position: relative;
  align-items: center;

  .searchHistoryItem {
    @extend .playlistItem;
  }
}

@media (min-width: 800px) {
  .mobileSearchbarWrapper {
    display: none;
  }
}
