/**Variable**/
@import './base/checked.scss';

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

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

.vxe-table--filter-option {
  @extend %XECheckbox;
  .vxe-checkbox--icon {
    left: 0.6em;
    top: 0.38em;
  }
}

.vxe-table {
  .vxe-table--filter-option {
    & > .vxe-checkbox--icon {
      font-size: $vxe-checkbox-font-size-default;
    }
  }
  &.size--medium {
    .vxe-table--filter-option {
      & > .vxe-checkbox--icon {
        font-size: $vxe-checkbox-font-size-medium;
      }
    }
  }
  &.size--small {
    .vxe-table--filter-option {
      & > .vxe-checkbox--icon {
        font-size: $vxe-checkbox-font-size-small;
      }
    }
  }
  &.size--mini {
    .vxe-table--filter-option {
      & > .vxe-checkbox--icon {
        font-size: $vxe-checkbox-font-size-mini;
      }
    }
  }
}