/**
* Copyright (c) 2022 - present TinyVue Authors.
* Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd.
*
* Use of this source code is governed by an MIT-style license.
*
* THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,
* BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
*
*/

@import '../custom.less';
@import './vars.less';

@tall-storage-prefix-cls: ~'@{css-prefix}tall-storage';
@storage-list-style-prefix-cls: ~'@{css-prefix}storage-list-style';
@storage-list-prefix-cls: ~'@{css-prefix}storage-list';
@storage-item-prefix-cls: ~'@{css-prefix}storage-item';

.@{tall-storage-prefix-cls} {
  .inject-TallStorage-vars();

  position: relative;

  .@{storage-list-style-prefix-cls} {
    position: absolute;
    background-color: var(--tv-TallStorage-bg-color);
    box-shadow: var(--tv-TallStorage-box-shadow);
    border-radius: var(--tv-TallStorage-border-radius);
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
    z-index: 10;

    .@{storage-list-prefix-cls} {
      padding: 0;
      list-style: none;
      overflow-y: auto;
      max-height: calc(var(--tv-TallStorage-item-height) * 5);

      .@{storage-item-prefix-cls} {
        height: var(--tv-TallStorage-item-height);
        line-height: var(--tv-TallStorage-item-height);
        padding: 0 8px;
        white-space: nowrap;

        &:hover,
        &.item-hover {
          cursor: pointer;
          background-color: var(--tv-TallStorage-item-bg-color-hover);
        }
      }
    }
  }
}