@import '../common/abstracts/variable';
@import '../common/abstracts/mixin';

@include b(table-content) {
  position: relative;
  overflow: hidden;
  box-sizing: border-box;


  @include when(border) {
    border: 1px solid #ececec;
  }

}

@include b(table) {
  position: relative;
  width: 100%;
  overflow: auto;
  background: #ffffff;

  :deep() {
    .wd-table-col:last-child {
      .wd-table__cell {
        @include when(border) {
          border-right: none;
        }
      }
    }
  }


  @include m(fixed) {
    position: absolute;
    left: 0;
    background: #ffffff;
    pointer-events: none;
    z-index: 1;

    @include when(shadow) {
      &::after {
        content: ' ';
        position: absolute;
        height: 100%;
        right: -30rpx;
        top: 0;
        width: 30rpx;
        height: 100%;
        background: linear-gradient(270deg, rgba(255, 255, 255, 0) 0%, rgba(0, 0, 0, 0.04) 100%);
      }
    }
  }

  @include e(header) {
    width: 100%;
    height: 48px;
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
  }

  @include e(body) {
    display: flex;
    box-sizing: border-box;
  }

  @include e(cell) {
    display: flex;
    align-items: center;
    box-sizing: border-box;
    flex: 0 0 auto;
    width: 220rpx;
    min-height: 50px;
    padding: 8px 10px;
    font-size: 13px;
    color: $-table-color;

    @include when(border) {
      border-right: 1px solid #ececec;
      border-bottom: 1px solid #ececec;
    }

    @include when(stripe) {
      background: #f3f3f3;
    }

    @include when(left) {
      justify-content: flex-start;
    }

    @include when(center) {
      justify-content: center;
    }

    @include when(right) {
      justify-content: flex-end;
    }
  }


  @include e(value) {
    @include when(ellipsis) {
      @include multiEllipsis(2);
    }
  }
}