@use '../../../styles/mixins';

.list {
  z-index: 1;

  overflow-x: auto;
  overflow-y: hidden;
  display: flex;
  flex-shrink: 0;
  flex-wrap: nowrap;
  gap: 0.0625rem;
  align-items: center;
  justify-content: center;

  // Prevent first item from being always partially obscured
  margin-left: -0.5rem;
  padding-left: 0.5rem;
  padding-block: 0.25rem;

  font-size: 0.875rem;

  background-color: var(--color-background);

  :global(html.theme-dark) & {
    background-color: #181818;
  }

  @include mixins.gradient-border-horizontal(0.5rem, 0.5rem);
}

.item-selected,
.item {
  display: flex;
  align-items: center;
  justify-content: center;

  width: auto;
  padding: 0.375rem 0.75rem;
  border-radius: 1rem;

  font-weight: var(--font-weight-semibold);
  color: var(--color-text-secondary);
  white-space: nowrap;

  transition: background-color 0.15s;

  &:hover {
    cursor: pointer;
    background-color: var(--color-background-secondary-accent);
  }
}

.selected-item {
  color: var(--color-text-secondary);
  background-color: var(--color-background-secondary);
}

:global(html.theme-dark) {

  .item-selected,
  .item {
    &:hover {
      background-color: rgba(255, 255, 255, 0.05);
    }
  }

  .selected-item {
    background-color: rgba(255, 255, 255, 0.1);
  }
}

.star {
  margin-right: 0.1875rem;
}
