@import './var.less';

@table-prefix-cls: ~"@{css-prefix}-table";

.@{table-prefix-cls} {
  overflow: hidden;
  position: relative;

  &-box {
    height: 100%;
    width: 100%;
    position: relative;
  }

  /* 三个div下table通用属性 */
  table {
    border-collapse: collapse;
    width: 100%;

    th {
      font-size: 12px;
      text-align: center;
      background: #f8f8f8;

      div {
        padding: 18px 15px;
      }
    }

    td {
      font-size: 14px;
      text-align: center;

      div {
        overflow: hidden;

        div {
          vertical-align: middle;
          padding: 18px 15px;
          text-align: center;
        }
      }
    }

    th,
    td {
      div {
        text-align: center;
        box-sizing: border-box;
      }
    }

    tbody {
      tr {
        &:nth-child(odd) {
          background: #fcfcfc;
        }

        &:nth-child(even) {
          background: #fff;
        }
      }
    }
  }

  &-scroll {
    -webkit-overflow-scrolling: auto;
    height: 100%;
    overflow: scroll;
  }

  &-fixed-left {
    -webkit-overflow-scrolling: auto;
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    overflow-x: scroll;
    overflow-y: hidden;
    z-index: 2;
    background: white;
  }

  &-fixed-left-top {
    position: absolute;
    top: 0;
    left: 0;
    overflow: scroll;
    z-index: 3;
    background: white;

    &::-webkit-scrollbar {
      display: none;
    }
  }

  &-fixed-top {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    overflow-y: scroll;
    overflow-x: hidden;
    z-index: 1;
  }

  .shadow {
    display: block;
    width: 10px;
    height: 100%;
    position: absolute;
    top: 0;
    background-color: white;
    background-image: linear-gradient(-90deg, #fff 0%, #000 100%);
    opacity: 0.04;
    z-index: 3;
  }
}
