/** header **/
.n-table-header
  overflow hidden
  position relative
  border-top 1px solid #e6e7eb
  border-bottom @border-top

.n-thead-tr
  background-color #f3f8fe

.n-th
  vertical-align middle
  height 100%
  overflow visible
  min-width 0
  min-height 36px
  position relative
  background-color inherit
  transition background-color 0.2s ease
  &-cell
    height 32px
    font-size 13px
    line-height 24px
    padding 4px 8px
    font-weight bold
    word-break break-all
    color #161616
    position relative
    text-align left
    display flex
    align-items center
    &.outer
      padding 0
  &-title
    n-ellipsis()
    font-weight inherit
    max-width 100%
  &-center
    justify-content center
  &-right
    justify-content flex-end

  &-icon
    flex-shrink 0
    margin-left 4px


// 该节点是为了填补 n-table-header 元素的 padding-right 颜色问题
.n-th:last-child:after
  content ''
  width 30px
  n-absolute(0, unset, 0, 100%)
  background-color inherit


/** thead resize **/
.n-th-resize
  n-absolute(0,-1px,0,unset)
  width 3px
  opacity 0
  cursor e-resize
  transition opacity 0.2s ease
  &-bar
    z-index 1
    top 2px
    bottom 2px
    left 1px
    right 1px
    position absolute
    background-color $primary-color
    &:before
    &:after
      content ''
      position absolute
      top 50%
      margin-top -3px
      border 3px solid transparent
    &:before
      right 2px
      border-left-width 0
    &:after
      left 2px
      border-right-width 0

.n-th:hover .n-th-resize
.n-th-resizing .n-th-resize
  opacity 1

.n-th-resizing .n-th-resize-bar
  transform scaleX(1.5)
  &:before
  &:after
    border-right-color $primary-color
    border-left-color $primary-color
