@mixin searchFilterControl {
  @include font-size(1.4rem);

  height: 4rem;

  padding: 0 2rem;

  background: rgb(64 64 64 / 0.5);
  border-radius: 10rem;
  color: #fff;
  font-weight: 500;
  white-space: nowrap;

  &:hover {
    background: #404040;
  }

  &:active {
    color: rgb(255 255 255 / 0.4);
  }
}

.searchContainer {
  position: relative;
}

.searchInput {
  @include font-size(4.8rem);

  width: 100%;

  padding: 0 0 0.5rem;

  background: none;
  border: none;
  border-bottom: 2px solid #fff;
  color: #fff;
  font-weight: bold;
  outline: none;

  &::placeholder {
    color: rgb(255 255 255 / 0.32);
  }

  &:not(:placeholder-shown) + .searchButton img {
    filter: invert(1);
  }

  &::-moz-selection,
  &::selection {
    color: #2638d9;
  }
}

.searchButton {
  position: absolute;
  right: 0;
  top: 2rem;

  width: 3.2rem;
  height: 3.2rem;

  & img {
    filter: invert(0.4);
  }
}

.searchDescription {
  margin-bottom: 44px;
  @include font-size(1.6rem);

  color: rgb(255 255 255 / 0.64);
}

.topicsList {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;

  margin-top: 9.6rem !important;
}

.topTopic {
  @include searchFilterControl;
}

.filterSwitcher {
  margin: 0 0 6.4rem !important;
  padding: 0 !important;

  button {
    color: #fff !important;
  }

  :global(.view-switcher__item--selected) {
    button {
      border-bottom-color: #fff !important;

      &:hover {
        background: none !important;
      }
    }
  }
}

.filterResults {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;

  margin: 6.4rem 0;
}

.filterResultsControl {
  @include searchFilterControl;
}

.searchLoader {
  width: 28px;
  height: 28px;

  border: 5px solid #fff;
  border-bottom-color: transparent;
  border-radius: 50%;

  animation: rotation 1s linear infinite;
}

@keyframes rotation {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}
