@import "../mixin.less";

.selector-wrapper {
  .flex(column, flex-start, flex-start);
  position: relative;
  height: 28px;

  > .current-value-container {
    .flex(row, space-between, center);
    @apply w-full h-full rounded px-2 pr-1 bg-white border cursor-pointer select-none;

    &:hover,
    &.active {
      background-color: @bg-whitegray;
    }

    > .value-text {
      margin-right: 0px;
      font-size: 13px;
      line-height: 32px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      width: calc(100% - 20px);
    }

    > .arrow-text {
      .flex(row, center, center);
      width: 16px;
      flex-shrink: 0;

      > .icon-img {
        width: 16px;
        height: auto;
        opacity: 0.6;
        transform: rotate(90deg);
      }
    }
  }

  > .items-wrapper {
    .flex(column, flex-start, flex-start);
    position: absolute;
    top: 100%;
    left: 0;
    width: auto;
    min-width: calc(100% + 16px);
    max-height: 256px;
    padding: 4px;
    overflow-y: auto;
    margin-top: 2px;
    margin-left: -8px;
    z-index: 1;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 0 8px 0 rgb(0 0 0 / 20%);
    .hide-scroll-bar();

    > .item-container {
      .flex(column, flex-start, flex-start);
      @apply w-full px-3 text-sm select-none leading-8 cursor-pointer rounded whitespace-nowrap hover:bg-gray-100;

      &.selected {
        color: @text-green;
      }
    }
  }
}
