@import '../../../global/theme.less';
@import '../../../global/mixin.less';

.ketaPvTable {
  :global {
    table {
      display: grid;
    }
    .@{ant-prefix}-table {
      .@{ant-prefix}-table-thead > tr > th {
        background: inherit;
        color: inherit;
        min-width: 120px;
      }
      .@{ant-prefix}-table-tbody > tr > td {
        padding: 0;
        min-width: 120px;
      }

      .@{ant-prefix}-table-thead > tr > th:first-child {
        padding-left: 12px;
      }
      .@{ant-prefix}-table-tbody > tr > td:first-child {
        padding-left: 0px;
      }

      // 过滤icon 的颜色
      .@{ant-prefix}-table-filter-trigger.active {
        .anticon {
          color: @theme-color;
        }
      }

      // 鼠标hover 上的tr td 的颜色
      .@{ant-prefix}-table-tbody > tr.@{ant-prefix}-table-row:hover > td,
      .@{ant-prefix}-table-tbody > tr > td.@{ant-prefix}-table-cell-row-hover {
        background-color: inherit;
      }
    }

    // 树形expandIcon 样式
    .@{ant-prefix}-table-cell {
      .@{ant-prefix}-table-row-expand-icon {
        margin-left: 12px;
        margin-top: 12px;
        margin-right: 0;
      }
    }
  }
}

.ketaPvTable.bordered {
  :global {
    .@{ant-prefix}-table {
      .@{ant-prefix}-table-thead > tr > th,
      .@{ant-prefix}-table-tbody > tr > td {
        border-bottom: 1px solid @t-dashboard-border-corder;
      }
    }
  }
}

.ketaPvTable.dark {
  :global {
    .@{ant-prefix}-table {
      background: #242c3b;
    }
    .@{ant-prefix}-table-tbody {
      .@{ant-prefix}-table-row {
        &:nth-child(2n) {
          background: #242c3b;
          &:hover {
            background: #242c3b;
          }
        }
        &:nth-child(2n + 1) {
          background: #273349;
          &:hover {
            background: #273349;
          }
        }
      }
    }

    .@{ant-prefix}-table-row-expand-icon {
      background: inherit;
      border-color: @t-pagination-border-color;
    }

    .@{ant-prefix}-pagination {
      color: #e6f0ff;
      .@{ant-prefix}-pagination-item-link {
        .anticon {
          color: @t-pagination-border-color;
        }
      }
      .@{ant-prefix}-pagination-simple-pager {
        > input {
          background: #242c3b;
          border-color: @t-pagination-border-color;
        }
      }
    }
  }
}

.ketaPvTable.light {
  :global {
    .@{ant-prefix}-table {
      background: #fff;
    }
    .@{ant-prefix}-table-tbody {
      .@{ant-prefix}-table-row {
        &:nth-child(2n) {
          background: #fff;
          &:hover {
            background: inherit;
            & > td {
              background: inherit;
            }
          }
        }
        &:nth-child(2n + 1) {
          background: #fafafa;
          &:hover {
            background: inherit;
            & > td {
              background: inherit;
            }
          }
        }
      }
    }

    .@{ant-prefix}-table-row-expand-icon {
      background: inherit;
      border-color: @t-pagination-border-color;
    }

    .@{ant-prefix}-pagination {
      color: #333333;
      .@{ant-prefix}-pagination-item-link {
        .anticon {
          color: @t-pagination-border-color;
        }
      }
      .@{ant-prefix}-pagination-simple-pager {
        > input {
          background: #fff;
          border-color: @t-pagination-border-color;
        }
      }
    }
  }
}

.ketaPvTable.eleganceGreen {
  :global {
    .@{ant-prefix}-table {
      background: #041925;
    }
    .@{ant-prefix}-table-tbody {
      .@{ant-prefix}-table-row {
        &:nth-child(2n) {
          background: #041925;
          &:hover {
            background: #041925;
          }
        }
        &:nth-child(2n + 1) {
          background: #142b3b;
          &:hover {
            background: #142b3b;
          }
        }
      }
    }

    .@{ant-prefix}-table-row-expand-icon {
      background: inherit;
      border-color: @t-pagination-border-color;
    }

    .@{ant-prefix}-pagination {
      color: #ffffff;
      .@{ant-prefix}-pagination-item-link {
        .anticon {
          color: @t-pagination-border-color;
        }
      }
      .@{ant-prefix}-pagination-simple-pager {
        > input {
          background: #041925;
          border-color: @t-pagination-border-color;
        }
      }
    }
  }
}
