@import '../../style/themes/default.less';

/* 数据表格头部工具栏 */
.ele-table-tool {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: @padding-md - 6px;

  .ele-table-tool-title {
    flex: auto;
    margin: 6px 0;
    display: flex;
    align-items: center;

    & > .ele-table-tool-title-label {
      margin-right: @padding-sm;
      box-sizing: border-box;
    }

    & > .ele-table-tool-title-content {
      flex: 1;
      box-sizing: border-box;
    }
  }

  .ele-tool {
    margin: 6px 0 6px auto;
    flex-wrap: wrap;

    .ele-tool-item {
      font-size: 16px;
      transition: color 0.2s;
      cursor: pointer;

      &:hover {
        color: @primary-color;
      }
    }
  }

  // 带表单的样式处理
  &.ele-toolbar-form .ele-table-tool-title {
    margin-top: 0;
    margin-bottom: 0;

    .ant-col {
      margin-top: 6px;
      margin-bottom: 6px;
    }
  }
}

// 带背景色
.ele-table-tool-default {
  margin-bottom: 0;
  padding: (@padding-xs - 6px) @padding-md;
  box-sizing: border-box;
  background: @table-header-bg;
  border-top: @border-width-base @border-style-base @border-color-split;
  border-left: @border-width-base @border-style-base @border-color-split;
  border-right: @border-width-base @border-style-base @border-color-split;

  .ele-tool .ele-tool-item {
    font-size: 14px;
    padding: 6px 7px;
    box-sizing: border-box;
    border: @border-width-base @border-style-base @border-color-base;
    border-radius: 2px;
    line-height: 1;
  }
}

.ele-table-tool-default + .ant-table-wrapper .ant-table table {
  border-radius: 0 0 0 0;
}

.ele-table-tool-default + .ant-table-wrapper {
  .ant-table-thead > tr:first-child > th:last-child {
    border-top-right-radius: 0;
  }
}

.ele-table-tool-default + .ant-table-wrapper {
  .ant-table-thead > tr:first-child > th:first-child {
    border-top-left-radius: 0;
  }
}
