@import '../../../styles/variables';

.wrap {
  display: flex;
  flex-direction: column;
  width: 100%;
  border-radius: $radius;
}

.grid {
  @include outer_shadow();
  display: flex;
  justify-content: stretch;
  flex-direction: column;
  flex: 1;
  border-radius: $radius;
  position: relative;
  background: $content_bg;
  overflow: hidden;

  &::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 60px;
    width: 100%;
    background: linear-gradient(transparent, $content_bg 90%);
    pointer-events: none;
    touch-action: none;

    @include tablet {
      display: none;
    }
  }
}

.items {
  padding: 0 $gap 0 $gap;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.label {
  display: flex;
  flex-direction: row;
  min-width: 0;
  padding: $gap;
  border-radius: $radius;

  @include title_with_line();

  color: transparentize(white, $amount: 0.8);

  &_search {
    color: white;
    padding-left: $gap * 1.2;
  }

  & > :global(.line) {
    margin-right: $gap;
  }
}

.label_text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search {
  @include outer_shadow();

  background: $content_bg_lighter;
  padding: $gap;
  border-radius: $radius;
}

.search_icon {
  stroke-width: 0.5;
  pointer-events: none;
  touch-action: none;
}

.close_icon {
  cursor: pointer;
  stroke-width: 0.5;
  transition: opacity 0.25s;
}

.toggles {
  & > div {
    padding: $gap;
    font: $font_14_semibold;
  }

  &__label {
    cursor: pointer;
  }
}

.fluid_toggle {
  @include desktop {
    display: none;
  }
}

.whatsnew {
  @container sizer (width < #{$flow_hide_recents}) {
    display: none;
  }
}

.search_results {
  overflow: auto;

  @include tablet {
    margin-top: $gap;
  }
}
