@font-size-base: 14px;
@resize-indicator-color: #333;

.@{prefixCls}-table {
  .@{ant-prefix}-table-cell-row-hover &-operator {
    display: flex;
  }

  td .@{ant-prefix}-input-number-input {
    text-align: inherit;
  }

  td .@{ant-prefix}-input-number-handler-wrap {
    display: none;
  }

  &-operator {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 10;
    display: none;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
    padding-left: 8px;
    white-space: nowrap;
    background-color: inherit;

    &::before {
      position: absolute;
      top: 0;
      left: -16px;
      width: 16px;
      height: 100%;
      box-shadow: inset -16px 0 8px -8px @table-row-hover-bg;
      content: '';
    }

    &-column {
      border-right: none !important;

      &::after {
        display: none !important;
      }
    }

    &-item {
      margin-right: 8px;
      padding: 0 8px;
      color: @primary-color;
      line-height: 28px;
      background-color: transparent;
      border: none;
      border-radius: 4px;
      outline: none;
      cursor: pointer;
      transition: background-color 0.2s;
      user-select: none;

      &:hover {
        background-color: .primary(0.12) [];
      }

      &:active {
        color: .primary(0.8) [];
      }

      &-disabled {
        color: rgba(51, 51, 51, 0.5) !important;
        cursor: not-allowed;

        &:hover {
          background-color: rgba(51, 51, 51, 0.06);
        }
      }
    }

    &-popover {
      position: absolute;
      z-index: 1000;
      width: 120px;

      &-items {
        transform: scale(0.6);
        transform-origin: 100% 0;
        opacity: 0;
        transition: transform 0.2s, opacity 0.2s;
        pointer-events: none;

        .popoverInner();

        &.animated {
          transform: scale(1);
          opacity: 1;
          pointer-events: visible;
        }
      }

      &-item {
        text-align: left;
        background-color: #fff;
        border: none;
        outline: none;
        .popoverItem();

        &-disabled {
          color: rgba(51, 51, 51, 0.5);
          cursor: not-allowed;
        }
      }
    }
  }

  .@{ant-prefix}-table-row-selected &-operator::before {
    box-shadow: inset -16px 0 8px -8px var(--ant-primary-1);
  }

  .@{ant-prefix}-table-row-selected:hover &-operator::before {
    box-shadow: inset -16px 0 8px -8px var(--ant-primary-color-2);
  }

  &-resizable-handle {
    position: absolute;
    top: 50%;
    right: -5px;
    z-index: 1;
    box-sizing: border-box;
    width: 11px;
    height: 12px;
    margin-top: -6px;
    padding: 0 5px;
    background-color: #bbb;
    background-clip: content-box;
    cursor: col-resize;
  }

  .@{ant-prefix}-table-bordered &-resizable-handle {
    right: -6px;
    background-color: transparent;
  }

  &-resizable-indicator {
    position: absolute;
    top: 0;
    z-index: 20;
    box-sizing: border-box;
    width: 11px;
    margin-left: -5px;
    padding: 0 5px;
    background-color: @resize-indicator-color;
    background-clip: content-box;
    cursor: col-resize;
  }

  &-resizing-col thead th {
    user-select: none;
  }

  &-sort {
    display: flex;
    align-items: center;
    cursor: pointer;

    &-title {
      margin-right: 10px;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    &-number {
      margin-left: 4px;
      color: #999;
      font-weight: normal;
      font-size: 12px;
    }
  }

  &-empty {
    display: inline-block;
    text-align: center;

    & > img {
      width: 120px;
      height: 120px;
      vertical-align: top;
    }
  }
}
