<commit_before>// stylelint-disable selector-max-type

// selector-max-type is needed for body:not(.intent-mouse) to target keyboard only styles.
// TODO: Introduce an additional .intent-keyboard class

$SelectMenu-border: $border-width $border-style lighten($gray-200, 3%);

// Select Menu
//
// A more advanced menu with support for navigation, filtering, and more.

.SelectMenu {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 99;
  display: flex;
  padding: $spacer-3;
  pointer-events: none;
  flex-direction: column;

  @include breakpoint(sm) {
    position: absolute;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    padding: 0;
  }
}

// Backdrop
//
// Adds a dark, semi transparent "cover" underneat the modal. Only visible for xs.

.SelectMenu::before {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  pointer-events: none;
  content: "";
  background-color: $black-fade-50;

  @include breakpoint(sm) {
    display: none;
  }
}

// Modal
//
// The main "box" that contains the content

.SelectMenu-modal {
  position: relative;
  z-index: 99; // Needs to be higher than .details-overlay's z-index: 80.
  display: flex;
  max-height: 66%;
  margin: auto 0;
  overflow: hidden; // Enables border radius on scrollable child elements
  pointer-events: auto;
  flex-direction: column;
  background-color: $gray-100;
  border-radius: $border-radius * 2;
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.4);
  animation: SelectMenu-modal-animation 0.12s cubic-bezier(0, 0.1, 0.1, 1) backwards;

  @keyframes SelectMenu-modal-animation {
    0% {
      opacity: 0;
      transform: scale(0.9);
    }
  }

  @keyframes SelectMenu-modal-animation--sm {
    0% {
      opacity: 0;
      transform: translateY(-$spacer-3);
    }
  }

  @include breakpoint(sm) {
    width: 300px;
    height: auto;
    max-height: 480px;
    margin: $spacer-1 0 $spacer-3 0;
    font-size: $font-size-small;
    border: $border-width $border-style $border-gray-dark;
    border-radius: $border-radius;
    box-shadow: $box-shadow-medium;
    animation-name: SelectMenu-modal-animation--sm;
  }
}

// Header
//
// Used for showing a title and the close button. Close button is only visible for xs.

.SelectMenu-header {
  display: flex;
  flex: none; // fixes header from getting squeezed in Safari iOS
  padding: $spacer-3;

  @include breakpoint(sm) {
    padding-top: $spacer-2;
    padding-bottom: $spacer-2;
  }
}

.SelectMenu-title {
  flex: auto;
  font-size: $body-font-size;
  font-weight: $font-weight-bold;

  @include breakpoint(sm) {
    font-size: inherit;
  }
}

.SelectMenu-closeButton {
  padding: $spacer-3;
  margin: -$spacer-3;
  color: $text-gray-light;
  background-color: transparent;
  border: 0;

  @include breakpoint(sm) {
    display: none;
  }
}

// Filter
//
// An input to filter a large list

.SelectMenu-filter {
  padding: $spacer-3;
  margin: 0;
  border-top: $border;

  @include breakpoint(sm) {
    padding: $spacer-2;
  }
}

.SelectMenu-input {
  display: block;
  width: 100%;

  @include breakpoint(sm) {
    font-size: $h5-size;
  }
}

// List
//
// The container that holds all the list items. Starts scrolling when the list gets too long.

.SelectMenu-list {
  position: relative;
  padding: 0;
  margin: 0;
  margin-bottom: -$border-width; // Hides the last border in the list
  flex: auto;
  overflow-x: hidden;
  overflow-y: auto;
  background-color: $bg-white;
  border-top: $border;
  -webkit-overflow-scrolling: touch; // Adds momentum + bouncy scrolling
}

// List Item
//
// The interactive element used to make a selection

.SelectMenu-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: $spacer-3;
  overflow: hidden;
  color: $text-gray;
  text-align: left;
  cursor: pointer;
  background-color: $bg-white;
  border: 0;
  border-bottom: $SelectMenu-border;

  @include breakpoint(sm) {
    padding-top: $spacer-2;
    padding-bottom: $spacer-2;
  }
}

// Icon
//
// The icon shown on the left of a list item. Typically a check icon.

.SelectMenu-icon {
  width: $spacer-3; // fixed width to make sure following content aligns
  margin-right: $spacer-2;
  visibility: hidden;
  transition: transform 0.12s cubic-bezier(0.5, 0.1, 1, 0.5), visibility 0s 0.12s linear;
  transform: scale(0);
}

// Tabs
//
// Allows switching between multiple lists

.SelectMenu-tabs {
  display: flex;
  flex-shrink: 0;
  margin-bottom: -$border-width; // hide border of element below
  overflow-x: auto;
  overflow-y: hidden;
  border-top: $border;
  -webkit-overflow-scrolling: touch;

  // Hide scrollbar so it doesn't cover the text
  &::-webkit-scrollbar {
    display: none;
  }

  @include breakpoint(sm) {
    padding: 0 $spacer-2;
    border-top: 0;
  }
}

.SelectMenu-tab {
  flex: 1;
  padding: $spacer-2 $spacer-3;
  font-size: $font-size-small;
  font-weight: $font-weight-semibold;
  color: $text-gray-light;
  text-align: center;
  background-color: transparent;
  border: 0;
  box-shadow: inset 0 -1px 0 $border-color;

  @include breakpoint(sm) {
    flex: none;
    padding: $spacer-1 $spacer-3;
    border: $border-width $border-style transparent;
    border-bottom-width: 0;
    border-top-left-radius: $border-radius;
    border-top-right-radius: $border-radius;
  }

  &[aria-selected="true"] {
    z-index: 1; // Keeps box-shadow visible when hovering
    color: $text-gray-dark;
    background-color: $bg-white;
    box-shadow: 0 0 0 1px $border-color;

    @include breakpoint(sm) {
      border-color: $border-color;
      box-shadow: none;
    }
  }
}

// Message, Blankslate and Loading
//
// A container used to show different kinds of content. Like a message, a blankslate or the loading animation.

.SelectMenu-message {
  border-bottom: $SelectMenu-border;
}

.SelectMenu-message,
.SelectMenu-blankslate,
.SelectMenu-loading {
  padding: $spacer-4 $spacer-3;
  text-align: center;
  background-color: $bg-white;
}

// Divider
//
// Can be used to divide the list into multiple groups

.SelectMenu-divider {
  padding: $spacer-1 $spacer-3;
  margin: 0;
  font-size: $font-size-small;
  font-weight: $font-weight-bold;
  color: $text-gray-light;
  background-color: $gray-100;
  border-bottom: $SelectMenu-border;
}

// Footer
//
// A container at the bottom.

.SelectMenu-footer {
  z-index: 0; // Avoid top border from getting covered by the negative margin of the list
  padding: $spacer-2 $spacer-3;
  font-size: $font-size-small;
  color: $text-gray-light;
  text-align: center;
  border-top: $border;

  @include breakpoint(sm) {
    padding: $spacer-1 $spacer-2;
  }
}

// Has Filter (modifier)
//
// Makes sure that the filter input keeps a fixed position at the top while typing. Only visible for xs.

.SelectMenu--hasFilter {
  .SelectMenu-modal {
    height: 80%;
    max-height: none;
    margin-top: 0;

    @include breakpoint(sm) {
      height: auto;
      max-height: 480px;
      margin-top: $spacer-1;
    }
  }
}

// States
//
// Different states

// Reset outlines
.SelectMenu-tab:focus,
.SelectMenu-item:focus {
  outline: none;
}

// Reset <a> elements
.SelectMenu-item:hover {
  text-decoration: none;
}

// Selected
//
// Visible when a used clicks/taps on a list item<commit_msg>Use variable for max-height<commit_after>// stylelint-disable selector-max-type

// selector-max-type is needed for body:not(.intent-mouse) to target keyboard only styles.
// TODO: Introduce an additional .intent-keyboard class

$SelectMenu-border: $border-width $border-style lighten($gray-200, 3%);
$SelectMenu-max-height: 480px;

// Select Menu
//
// A more advanced menu with support for navigation, filtering, and more.

.SelectMenu {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 99;
  display: flex;
  padding: $spacer-3;
  pointer-events: none;
  flex-direction: column;

  @include breakpoint(sm) {
    position: absolute;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    padding: 0;
  }
}

// Backdrop
//
// Adds a dark, semi transparent "cover" underneat the modal. Only visible for xs.

.SelectMenu::before {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  pointer-events: none;
  content: "";
  background-color: $black-fade-50;

  @include breakpoint(sm) {
    display: none;
  }
}

// Modal
//
// The main "box" that contains the content

.SelectMenu-modal {
  position: relative;
  z-index: 99; // Needs to be higher than .details-overlay's z-index: 80.
  display: flex;
  max-height: 66%;
  margin: auto 0;
  overflow: hidden; // Enables border radius on scrollable child elements
  pointer-events: auto;
  flex-direction: column;
  background-color: $gray-100;
  border-radius: $border-radius * 2;
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.4);
  animation: SelectMenu-modal-animation 0.12s cubic-bezier(0, 0.1, 0.1, 1) backwards;

  @keyframes SelectMenu-modal-animation {
    0% {
      opacity: 0;
      transform: scale(0.9);
    }
  }

  @keyframes SelectMenu-modal-animation--sm {
    0% {
      opacity: 0;
      transform: translateY(-$spacer-3);
    }
  }

  @include breakpoint(sm) {
    width: 300px;
    height: auto;
    max-height: $SelectMenu-max-height;
    margin: $spacer-1 0 $spacer-3 0;
    font-size: $font-size-small;
    border: $border-width $border-style $border-gray-dark;
    border-radius: $border-radius;
    box-shadow: $box-shadow-medium;
    animation-name: SelectMenu-modal-animation--sm;
  }
}

// Header
//
// Used for showing a title and the close button. Close button is only visible for xs.

.SelectMenu-header {
  display: flex;
  flex: none; // fixes header from getting squeezed in Safari iOS
  padding: $spacer-3;

  @include breakpoint(sm) {
    padding-top: $spacer-2;
    padding-bottom: $spacer-2;
  }
}

.SelectMenu-title {
  flex: auto;
  font-size: $body-font-size;
  font-weight: $font-weight-bold;

  @include breakpoint(sm) {
    font-size: inherit;
  }
}

.SelectMenu-closeButton {
  padding: $spacer-3;
  margin: -$spacer-3;
  color: $text-gray-light;
  background-color: transparent;
  border: 0;

  @include breakpoint(sm) {
    display: none;
  }
}

// Filter
//
// An input to filter a large list

.SelectMenu-filter {
  padding: $spacer-3;
  margin: 0;
  border-top: $border;

  @include breakpoint(sm) {
    padding: $spacer-2;
  }
}

.SelectMenu-input {
  display: block;
  width: 100%;

  @include breakpoint(sm) {
    font-size: $h5-size;
  }
}

// List
//
// The container that holds all the list items. Starts scrolling when the list gets too long.

.SelectMenu-list {
  position: relative;
  padding: 0;
  margin: 0;
  margin-bottom: -$border-width; // Hides the last border in the list
  flex: auto;
  overflow-x: hidden;
  overflow-y: auto;
  background-color: $bg-white;
  border-top: $border;
  -webkit-overflow-scrolling: touch; // Adds momentum + bouncy scrolling
}

// List Item
//
// The interactive element used to make a selection

.SelectMenu-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: $spacer-3;
  overflow: hidden;
  color: $text-gray;
  text-align: left;
  cursor: pointer;
  background-color: $bg-white;
  border: 0;
  border-bottom: $SelectMenu-border;

  @include breakpoint(sm) {
    padding-top: $spacer-2;
    padding-bottom: $spacer-2;
  }
}

// Icon
//
// The icon shown on the left of a list item. Typically a check icon.

.SelectMenu-icon {
  width: $spacer-3; // fixed width to make sure following content aligns
  margin-right: $spacer-2;
  visibility: hidden;
  transition: transform 0.12s cubic-bezier(0.5, 0.1, 1, 0.5), visibility 0s 0.12s linear;
  transform: scale(0);
}

// Tabs
//
// Allows switching between multiple lists

.SelectMenu-tabs {
  display: flex;
  flex-shrink: 0;
  margin-bottom: -$border-width; // hide border of element below
  overflow-x: auto;
  overflow-y: hidden;
  border-top: $border;
  -webkit-overflow-scrolling: touch;

  // Hide scrollbar so it doesn't cover the text
  &::-webkit-scrollbar {
    display: none;
  }

  @include breakpoint(sm) {
    padding: 0 $spacer-2;
    border-top: 0;
  }
}

.SelectMenu-tab {
  flex: 1;
  padding: $spacer-2 $spacer-3;
  font-size: $font-size-small;
  font-weight: $font-weight-semibold;
  color: $text-gray-light;
  text-align: center;
  background-color: transparent;
  border: 0;
  box-shadow: inset 0 -1px 0 $border-color;

  @include breakpoint(sm) {
    flex: none;
    padding: $spacer-1 $spacer-3;
    border: $border-width $border-style transparent;
    border-bottom-width: 0;
    border-top-left-radius: $border-radius;
    border-top-right-radius: $border-radius;
  }

  &[aria-selected="true"] {
    z-index: 1; // Keeps box-shadow visible when hovering
    color: $text-gray-dark;
    background-color: $bg-white;
    box-shadow: 0 0 0 1px $border-color;

    @include breakpoint(sm) {
      border-color: $border-color;
      box-shadow: none;
    }
  }
}

// Message, Blankslate and Loading
//
// A container used to show different kinds of content. Like a message, a blankslate or the loading animation.

.SelectMenu-message {
  border-bottom: $SelectMenu-border;
}

.SelectMenu-message,
.SelectMenu-blankslate,
.SelectMenu-loading {
  padding: $spacer-4 $spacer-3;
  text-align: center;
  background-color: $bg-white;
}

// Divider
//
// Can be used to divide the list into multiple groups

.SelectMenu-divider {
  padding: $spacer-1 $spacer-3;
  margin: 0;
  font-size: $font-size-small;
  font-weight: $font-weight-bold;
  color: $text-gray-light;
  background-color: $gray-100;
  border-bottom: $SelectMenu-border;
}

// Footer
//
// A container at the bottom.

.SelectMenu-footer {
  z-index: 0; // Avoid top border from getting covered by the negative margin of the list
  padding: $spacer-2 $spacer-3;
  font-size: $font-size-small;
  color: $text-gray-light;
  text-align: center;
  border-top: $border;

  @include breakpoint(sm) {
    padding: $spacer-1 $spacer-2;
  }
}

// Has Filter (modifier)
//
// Makes sure that the filter input keeps a fixed position at the top while typing. Only visible for xs.

.SelectMenu--hasFilter {
  .SelectMenu-modal {
    height: 80%;
    max-height: none;
    margin-top: 0;

    @include breakpoint(sm) {
      height: auto;
      max-height: $SelectMenu-max-height;
      margin-top: $spacer-1;
    }
  }
}

// States
//
// Different states

// Reset outlines
.SelectMenu-tab:focus,
.SelectMenu-item:focus {
  outline: none;
}

// Reset <a> elements
.SelectMenu-item:hover {
  text-decoration: none;
}

// Selected
//
// Visible when a used clicks/taps on a list item
{'fraction_non_alphanumeric': 0.13799738849563603, 'fraction_numerical': 0.019311387533502852, 'mean_word_length': 2.9489823609226593, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2115040', 'n_tokens_mistral': 5387, 'n_tokens_neox': 5111, 'n_words': 1408}