/**Variable**/
//@import './base/checked.less';

// 单选框和复选框
.RadioAndCheckboxSpan() {
  position: relative;
  user-select: none;
  cursor: pointer;
}
.RadioAndCheckboxIcon() {
  display: none;
  position: absolute;
  height: 1em;
  width: 1em;
}

.vxe-export--panel-column > ul {
  list-style-type: none;
  overflow: auto;
  margin: 0;
  padding: 0;
  user-select: none;
  & > li {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
  }
}

.vxe-export--panel {
  & > table {
    width: 100%;
    border: 0;
    table-layout: fixed;
    tr {
      td {
        padding: 0 10px;
        &:nth-child(1) {
          text-align: right;
          width: 30%;
          font-weight: 700;
          padding: 8px 10px;
        }
        &:nth-child(2) {
          width: 70%;
        }
        & > .vxe-input,
        & > .vxe-select {
          width: 80%;
        }
        & > .vxe-export--panel-option-row {
          padding: 0.25em 0;
        }
      }
    }
  }
  .vxe-export--panel-column {
    width: 80%;
    border: 1px solid @vxe-input-border-color;
    margin: 3px 0;
    border-radius: @vxe-border-radius;
    user-select: none;
    & > ul {
      & > li {
        padding: 0.2em 1em 0.2em 2.3em;
        each(range(2, 8), {
          @interval: @value - 1 + 0.2;
          &.level--@{index}{
          padding-left: (@interval + 2.3) + 'em';
          .vxe-checkbox--icon {
            left: (@interval + 0.6) + 'em';
          }
        }
        });
      }
    }
    .vxe-export--panel-column-header {
      padding: 0.1em 0;
      background-color: @vxe-table-header-background-color;
      font-weight: 700;
      border-bottom: 1px solid @vxe-table-border-color;
    }
    .vxe-export--panel-column-body {
      padding: 0.2em 0;
      min-height: 10em;
      max-height: 17.6em;
    }
  }
  .vxe-import-selected--file {
    padding-right: 40px;
    position: relative;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    user-select: none;
    & > i {
      display: none;
      position: absolute;
      top: 50%;
      right: 15px;
      transform: translateY(-50%);
      font-size: 16px;
      cursor: pointer;
    }
    &:hover {
      & > i {
        display: block;
      }
      color: @vxe-primary-color;
    }
  }
  .vxe-import-select--file {
    border: 1px dashed @vxe-input-border-color;
    padding: 6px 34px;
    outline: 0;
    border-radius: @vxe-border-radius;
    background-color: @vxe-input-background-color;
    user-select: none;
    cursor: pointer;
    &:focus {
      border-color: @vxe-primary-color;
      box-shadow: 0 0 0.25em 0 @vxe-primary-color;
    }
    &:hover {
      color: @vxe-primary-color;
      border-color: @vxe-primary-color;
    }
  }
  .vxe-export--panel-btns {
    text-align: right;
    padding: 0.25em;
  }
}

.vxe-export--panel-column-option {

  //&:extend(.RadioAndCheckboxSpan);
  .RadioAndCheckboxSpan();
  .vxe-checkbox--icon {
    //&:extend(.RadioAndCheckboxIcon);
    .RadioAndCheckboxIcon();
    font-size: @vxe-checkbox-font-size-default;
    &:before {
      content: "";
      position: absolute;
      height: 1em;
      width: 1em;
      top: 0;
      left: 0;
      background-color: @vxe-checkbox-icon-background-color;
      border-radius: @vxe-checkbox-border-radius;
      border: @vxe-checkbox-border-width solid @vxe-input-border-color;
    }
  }
  .vxe-checkbox--unchecked-icon {
    display: inline-block;
  }
  .vxe-checkbox--checked-icon {
    &:after {
      content: "";
      position: absolute;
      height: @vxe-checkbox-checked-height;
      width: @vxe-checkbox-checked-width;
      top: 50%;
      left: 50%;
      border: @vxe-checkbox-border-width solid @vxe-checkbox-checked-icon-border-color;
      border-left: 0;
      border-top: 0;
      transform: translate(-50%, -50%) rotate(45deg);
    }
  }
  .vxe-checkbox--indeterminate-icon {
    &:after {
      content: "";
      position: absolute;
      top: 50%;
      left: 50%;
      height: @vxe-checkbox-indeterminate-height;
      width: @vxe-checkbox-indeterminate-width;
      background-color: @vxe-checkbox-indeterminate-icon-background-color;
      transform: translate(-50%, -50%);
    }
  }
  &.is--checked,
  &.is--indeterminate {
    color: @vxe-primary-color;
    .vxe-checkbox--unchecked-icon {
      display: none;
    }
    .vxe-checkbox--icon {
      &:before {
        border-color: @vxe-primary-color;
        background-color: @vxe-primary-color;
      }
    }
  }
  &.is--checked {
    .vxe-checkbox--checked-icon {
      display: inline-block;
    }
  }
  &.is--indeterminate {
    .vxe-checkbox--indeterminate-icon {
      display: inline-block;
    }
  }
  &:not(.is--disabled) {
    &:hover {
      .vxe-checkbox--icon {
        &:before {
          border-color: @vxe-primary-color;
        }
      }
    }
  }
  &.is--disabled {
    cursor: not-allowed;
    color: @vxe-disabled-color;
    .vxe-checkbox--icon {
      &:before {
        border-color: @vxe-input-disabled-color;
        background-color: @vxe-input-disabled-background-color;
      }
      &:after {
        border-color: @vxe-primary-disabled-color;
      }
    }
  }

  .vxe-checkbox--icon {
    left: 0.6em;
    top: 0.38em;
  }
  &:hover {
    background-color: @vxe-table-row-hover-background-color;
  }
}

.vxe-modal--wrapper {
  .vxe-export--panel-column-option {
    & > .vxe-checkbox--icon {
      font-size: @vxe-checkbox-font-size-default;
    }
  }
  &.size--medium {
    .vxe-export--panel-column-option {
      & > .vxe-checkbox--icon {
        font-size: @vxe-checkbox-font-size-medium;
      }
    }
  }
  &.size--small {
    .vxe-export--panel-column-option {
      & > .vxe-checkbox--icon {
        font-size: @vxe-checkbox-font-size-small;
      }
    }
  }
  &.size--mini {
    .vxe-export--panel-column-option {
      & > .vxe-checkbox--icon {
        font-size: @vxe-checkbox-font-size-mini;
      }
    }
  }
}
