@import "../../style/mixins/index";
@import "../../style/themes/default";

@prefix-cls: ~"@{mkui-prefix}-fee-type-input-icon";

.@{prefix-cls} {
  .reset-component;
  display: inline-block;
  position: relative;
  outline: 0;
  width: 100%;
  padding-left: 35px;

  ul,
  ol {
    margin: 0;
    padding: 0;
    list-style: none;
  }

  > ul > li > a {
    padding: 0;
    background-color: @component-background;
  }

  &-selection {
    height: 32px;
    outline: none;
    user-select: none;
    box-sizing: border-box;
    display: block;
    position: relative;
    cursor: pointer;
    background-color: @component-background;
    border-radius: @border-radius-base;
    border: @border-width-base @border-style-base @border-color-base;
    border-top-width: @border-width-base + 0.02px;
    transition: all .3s @ease-in-out;

    &:hover {
      border-color: @input-hover-border-color;
      border-right-width: 1px !important;
    }

    .@{prefix-cls}-focused &,
    &:focus,
    &:active {
      border-color: @outline-color;
      outline: 0;
    }

    &-selected-value {
      float: left;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      max-width: 100%;
      padding-right: 20px;
    }
    & &-icon {
      position: absolute;
      top: 50%;
      right: @control-padding-horizontal - 1px;
      line-height: 1;
      margin-top: -@font-size-sm / 2;
      transform-origin: 50% 50%;
      color: @disabled-color;
      transition: transform .3s;
    }
  }

  &-icon {
    position: absolute;
    top: 0;
    left: 0;
    font-size: 32px;
  }

  &.@{prefix-cls}-disabled {
    .@{prefix-cls}-selection {
      border-bottom: @border-width-base @border-style-disable @border-color-base;
      background-color: #fff;
      cursor: default;
      &-icon {
        display: none;
      }
    }
  }
  .@{prefix-cls}-selection {
    border: 0;
    border-bottom: @border-width-base @border-style-base @border-color-base;
    border-radius: 0;
  }

  &-selection__rendered {
    display: block;
    margin-left: 0;
    margin-right: @control-padding-horizontal - 1px;
    position: relative;
    line-height: @input-height-base - 2px;
    &:after {
      content: '.';
      visibility: hidden;
      pointer-events: none;
      display: inline-block;
      width: 0;
    }
    .mkui-ticker {
      float: left;
    }
  }

  &-selection__placeholder {
    position: absolute;
    top: 50%;
    left: 0;
    right: 9px;
    color: @input-placeholder-color;
    line-height: 20px;
    height: 20px;
    max-width: 100%;
    margin-top: -10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: left;
  }

  &-open {
    .@{prefix-cls}-selection {
      border-color: @outline-color;
      outline: 0;
      .@{prefix-cls}-selection-icon {
        transform: rotate(180deg);
      }
    }
  }

  &-dropdown-wrapper {
    .reset-component;
    background-color: @component-background;
    box-shadow: @box-shadow-base;
    border-radius: @border-radius-base;
    box-sizing: border-box;
    z-index: @zindex-dropdown;
    left: -9999px;
    top: -9999px;
    position: absolute;
    outline: none;
    font-size: @font-size-base;
    min-height: 100px;
    min-width: 300px;
    &-hidden {
      display: none;
    }
  }
  &-loading {
    display: block;
    margin: 25px auto;
    font-size: @loading-size-lg;
    color: @loading-circle-color;
  }
}
