// @import "../_utils.scss";
// @import "./simpleTable.scss";
// @import "./editgird.scss";
// @import "./button.scss";
// @import "./input.scss";
// @import "./page.scss";
// @import "./icon.scss";

.#{$transferTable-prefix-cls} {
  position: relative;
  line-height: $line-height-base;

  &-list {
    display: inline-block;
    // height: $max-height;
    font-size: $font-size-small;
    vertical-align: middle;
    position: relative;

    &-with-footer {
      // padding-bottom: 35px;
    }

    &-header {
      padding: $transferTable-list-header-padding;
      background: $transfer-table-header-bg;
      color: $text-color;
      border: 1px solid $border-color-base;
      border-bottom: 1px solid $border-color-split;
      border-radius: $transfer-table-border-radius $transfer-table-border-radius 0 0;
      overflow: hidden;
      position: absolute;
      top: $transferTable-list-header-top;
      left: $transferTable-list-header-left;
      width: $transferTable-list-header-width;
      z-index: 1;
      @if $--size-switch == yes {
        font-size: $--size-font-size-base;  
        @include computed-line-height;
        padding:computed-padding-vertical($--size-height-base+4px, $--size-font-size-base, 1px) 16px;
      
      } 
      @include theme-background-color($__transferTable-list-header_background-color);
      @include theme-font-color($__transferTable-list-header_font-color);
      @include theme-border-color($__transferTable-list-header_border-color);
      @include theme-border-bottom-color($__transferTable-list-header_border-bottom-color);

      &-title {
        cursor: pointer;
      }

      & > span {
        padding-left: $transferTable-list-header-title-span-padding-left;
      }

      &-count {
        margin: 0 !important;
        float: right;

        @include theme-font-color($__transferTable-list-header-count_font-color);
      }
    }

    &-body {
      border: 1px solid $border-color-base;
      border-top: none;
      // border-bottom: none;
      border-radius: 0 0 $transfer-table-border-radius $transfer-table-border-radius;
      position: relative;
      overflow: hidden;
      z-index: 0;

      @include theme-border-color($__transferTable-list-header_border-color);
      // 兼容 transferTable 边框没有圆角的问题
      ul .h-editgird-wrapper {
        border: 1px solid $border-color-base;
        margin: 0 -1px -2px;

        @include theme-border-color($__transferTable-list-header_border-color);
      }

      .h-editgird::after {
        right: -1px;
      }

      .h-editgird-tbody tr td:last-child,
      .cur-th th:last-child {
        border-right-color: transparent;

        @include theme-border-right-color($__transferTable-sortable-parent_hover_background);
      }

      &-with-search {
        @if $--size-switch == yes {
          padding-top: $--size-height-base + 2 * $--size-offset-base + 2px;
        } @else {
          padding-top: $transferTable-list-body-with-search-padding-top;
        }
        
      }

      &-with-footer {
        border-radius: 0;
      }
    }

    &-content {
      // height: 100%;
      // overflow: auto;
      height: auto;

      &-item {
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;

        & > span {
          padding-left: $transferTable-list-content-item-span-padding-left;
        }
      }

      &-not-found {
        display: none;
        text-align: center;
        color: $btn-disable-color;

        @include theme-font-color($__transferTable-list-content-notFound_font-color);
      }

      &-not-found:only-child {
        display: block;
      }
    }

    &-data-not-found {
      text-align: center;
      color: $btn-disable-color;

      @include theme-font-color($__transferTable-list-content-notFound_font-color);
    }

    &-body-with-search &-content {
      @if $--size-switch == yes {
        padding: 0;
      } @else {
        padding: $transferTable-list-body-with-search-content-padding;
      }
    }

    &-body-search-wrapper {
      @if $--size-switch == yes {
        padding:$--size-offset-base;
      } @else {
        padding: $transferTable-list-body-with-wrapper-padding;
      }
      position: absolute;
      top: $transferTable-list-body-with-wrapper-top;
      left: $transferTable-list-body-with-wrapper-left;
      right: $transferTable-list-body-with-wrapper-right;
      border-bottom: none;
      border-top: none;
      border: 1px solid transparent !important;

      @include theme-border-color($__transferTable-sortable-parent_hover_background, $--important);
    }

    &-search {
      position: relative;
    }

    &-footer {
      border: 1px solid $border-color-base;
      padding: $transferTable-list-footer-padding;
      border-top: none;
      border-radius: 0 0 $border-radius-base $border-radius-base;
      bottom: $transferTable-list-footer-bottom;
      left: $transferTable-list-footer-left;
      right: $transferTable-list-footer-right;

      @include theme-border-color($__transferTable-list-body-footer_border-color);
      // min-height: 35px;
      @include clearfix();

      .#{$page-prefix-cls}{
        @if $--size-switch == yes {
          padding: $--size-offset-base;
          padding-bottom: $--size-offset-base - 3px;//要减掉footer原有的下部3px的padding
        } @else {
        }
       
      }
      
    }
  }

  &-list-with-title {
    @if $--size-switch == yes {
      padding-top: $--size-height-base + 4px;
    } @else {
      padding-top: $transferTable-list-title-padding-top;
    }
  }

  &-operation {
    display: inline-block;
    overflow: hidden;
    margin: $transferTable-list-operation-margin;
    vertical-align: middle;

    .#{$btn-prefix-cls} {
      display: block;
      min-width: $btn-circle-size-small;
      margin-bottom: $transferTable-list-operation-margin-bottom;

      &:last-child {
        margin-bottom: 0;
      }
    }
  }
}

@include select-item($transferTable-prefix-cls, $transferTable-item-prefix-cls);

.#{$transferTable-item-prefix-cls}:hover {
  background: transparent;
}

.sortable-parent li:hover {
  background: transparent;

  @include theme-background-color($__transferTable-sortable-parent_hover_background-color);
}

.sortable-chosen {
  background: #fff !important;

  @include theme-background-color($__transferTable-sortable-chosen_background-color, $--important);
}

.sortable-ghost {
  background: #f3f3f3 !important;

  @include theme-background-color($__transferTable-sortable-ghost_background-color, $--important);
}

