/**Variable**/
@import "./checked.scss";

/*筛选*/
.table-plus-cell--filter {
  padding: 0 0.1em 0 0.25em;
  text-align: center;
  vertical-align: middle;
  display: inline-block;
  line-height: 0;
  &.col--filter {
    .table-plus-filter--btn {
      color: $table-plus-font-color;
    }
  }
  .table-plus-filter--btn {
    color: $el-table-plus-column-icon-border-color;
    cursor: pointer;
    &:hover {
      color: $table-plus-font-color;
    }
  }
}
.is--filter-active {
  .table-plus-cell--filter {
    .table-plus-filter--btn {
      color: $table-plus-primary-color;
    }
  }
}

/*筛选容器*/
.el-table-plus--filter-wrapper {
  display: none;
  position: absolute;
  top: 0;
  min-width: 100px;
  border-radius: $table-plus-border-radius;
  background-color: $el-table-plus-filter-panel-background-color;
  border: 1px solid $el-table-plus-popup-border-color;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);
  z-index: 10;
  &:not(.is--multiple) {
    text-align: center;
  }
  &.is--active {
    display: block;
  }
  .table-plus--filter-header,
  .table-plus--filter-body {
    & > li {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      max-width: 360px;
      padding: 0.25em 0.8em;
      cursor: pointer;
      &.is--checked {
        color: $table-plus-primary-color;
      }
      &:hover {
        background-color: $el-table-plus-row-hover-background-color;
      }
    }
  }
  .table-plus--filter-header {
    padding-top: 0.2em;
  }
  .table-plus--filter-body {
    max-height: 200px;
    padding-bottom: 0.2em;
  }
  & > ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    overflow: auto;
    user-select: none;
  }
  &.is--multiple {
    & > ul {
      & > li {
        padding: 0.25em 0.8em 0.25em 1em;
      }
    }
  }
  .table-plus--filter-footer {
    border-top: 1px solid $el-table-plus-popup-border-color;
    padding: 0.6em;
    user-select: none;
    button {
      background-color: transparent;
      padding: 0 0.4em;
      border: 0;
      color: $table-plus-font-color;
      cursor: pointer;
      &:focus {
        outline: none;
      }
      &:hover {
        color: $table-plus-primary-color;
      }
      &.is--disabled {
        color: $table-plus-font-disabled-color;
        cursor: not-allowed;
      }
    }
  }
}

.table-plus--filter-option {
  @extend %XECheckboxIcon;
}
