/* Search */

@use "../../../../theme-color";
@use "../../gnome-shell";
@use "../../typography";
@use "overview";
@use "app-grid";

// search overview container
$searchResultsContent: if(gnome-shell.$version >= 3.34, "#searchResultsContent", "#searchResultsBin");

#{$searchResultsContent} {
  max-width: 1024px;
}

#searchResultsContent {
  padding-left: 16px;
  padding-right: 16px;
  spacing: 16px;
}

// search results sections "the boxes"
.search-section {
  // This should be equal to #searchResultsContent spacing
  spacing: 16px;

  // separator
  .search-section-separator {
    height: 1px;
    background-color: theme-color.divider(overview.$on-color);
  }

  &:last-child .search-section-separator {
    height: 0;
    background-color: transparent;
  }
}

// content
.search-section-content {
  // This is the space between the provider icon and the results container
  spacing: 32px;

  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background-color: transparent;
  color: inherit;
  text-shadow: none;
}

// "no results" text
.search-statustext {
  @include overview.status-text;
}

@if gnome-shell.$version >= 3.38 {
  .grid-search-results {
    spacing: 32px;
  }
}

// Search results with icons
.grid-search-result {
  @extend %app-well-app;
}

// search result provider
.search-provider-icon {
  @include overview.item;

  // content
  .list-search-provider-content {
    spacing: 20px;

    // provider labels
    .list-search-provider-details {
      width: 150px;
      margin-top: 0;
      color: theme-color.hint(overview.$on-color);
      // font-weight: bold;
    }
  }
}

// search results list
.list-search-results {
  spacing: 4px;
}

// search result listitem
.list-search-result {
  @include overview.item;

  // content
  .list-search-result-content {
    spacing: 30px;
  }

  // list item title (with leading icon)
  .list-search-result-title {
    spacing: 12px;
    color: inherit;
    @include typography.subtitle1;
  }

  // list item description
  .list-search-result-description {
    color: theme-color.hint(overview.$on-color);
  }
}
