/*---------------------------------------------------------------------------------------------
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
@import "~@bentley/ui-core/lib/ui-core/index";

$uicore-list-item-height:  $uicore-baseline * 2;    ///  22px; /// ~1.618;

ul.core-listbox {
  list-style: none;
  outline: none;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: auto;
  color: $buic-foreground-body;
  border: 1px solid $buic-foreground-disabled; // default border: disabled or muted foreground
  position: relative; // required to properly set scrollTop position

  @include uicore-touch-scrolling;
  @include uicore-scrollbar();

  &:focus {
    border-color: $buic-foreground-focus;
    li.core-listbox-item.focused {
      background-color: $buic-row-hover;
      border: 1px solid $buic-foreground-primary;
    }
  }

  li.core-listbox-item {
    display: inline-flex;
    line-height: $uicore-list-item-height;
    padding-left: 4px;
    &[aria-selected='true'] {
      background-color: $buic-row-selection;
    }
    &[aria-disabled="true"] {
      pointer-events: none;
      color: $buic-foreground-disabled;
    }
    &:hover {
      background-color: $buic-row-hover;
    }
  }
}
