@import "../vars.less";
@table-thead-background-color: #fbfbfb;
@table-border-color: #f0f0f0;

.hive-table {
  table {
    width: 100%;
    border-bottom: 1px solid @table-border-color;
    border-top: 1px solid @table-border-color;
    border-collapse: collapse;

    td,
    th {
      padding: 16px 18px;
      line-height: 1.5;
      text-align: left;
      font-weight: 400;
    }

    tbody {
      tr {
        border-top: 1px solid @table-border-color;
        font-size: 12px;
        color: @text-color;
      }
    }

    .hive-table-td-expand {
      padding: 0;
      box-shadow: inset 0px 15px 10px -15px @table-border-color;
      background-color: #FBFBFB;
    }
  }

  &-fixed {
    overflow: auto;
    overflow-x: hidden;
    position: relative;

    &-head {
      margin-bottom: -20px;
      // padding-bottom: 20px;
      // overflow: hidden;
      overflow: scroll;
    }

    &-body {
      overflow: auto;
      position: relative;
      background: #fff;

      table {
        border-top: none;
      }

      tr:first-child {
        border-top: none;
      }
    }

    &-left {
      position: absolute;
      left: 0;
      top: 0;
      overflow: hidden;
    }

    &-left-shabow {
      -webkit-box-shadow: 6px 0 6px -4px rgba(0, 0, 0, 0.15);
      box-shadow: 6px 0 6px -4px rgba(0, 0, 0, 0.1);
    }

    &-right {
      position: absolute;
      right: 0;
      top: 0;
      overflow: hidden;
    }

    &-right-shabow {
      -webkit-box-shadow: -6px 0 6px -4px rgba(0, 0, 0, 0.15);
      box-shadow: -6px 0 6px -4px rgba(0, 0, 0, 0.15);
    }

    // &-right-shabow {
    //   -webkit-box-shadow: 6px 0 6px -4px rgba(0, 0, 0, 0.15);
    //   box-shadow: 6px 0 6px -4px rgba(0, 0, 0, 0.1);
    // }
  }

  &-thead {
    background: @table-thead-background-color;

    th {
      font-size: 14px;
      color: @text-color;
      padding: 18px 18px;
    }

    th+th {
      border-left: 1px solid @table-border-color;
    }

    &-title {
      display: table-cell;
      vertical-align: middle;
    }

    &-sorter {
      display: table-cell;
      vertical-align: middle;

      &-inner {
        height: 1em;
        margin-left: 12px;
        color: #bfbfbf;
        line-height: 1em;
        text-align: center;
        -webkit-transition: all 0.3s;
        transition: all 0.3s;
        position: relative;
      }

      &-up,
      &-down {
        position: absolute;
        left: 0;
        border-style: solid;
        height: 0;
        width: 0;
        border: solid transparent;
        transition: all 0.3s;
      }

      &-up {
        border-width: 0 4px 6px;
        border-bottom-color: @placeholder-color;
        bottom: 55%;
      }

      &-down {
        top: 2px;
        border-width: 6px 4px 0;
        border-top-color: @placeholder-color;
        top: 55%;
      }

      &--asc {
        .hive-table-thead-sorter-up {
          border-bottom-color: @primary-color;
        }
      }

      &--desc {
        .hive-table-thead-sorter-down {
          border-top-color: @primary-color;
        }
      }
    }

    &-th-sorter {
      cursor: pointer;
      -webkit-transition: all 0.3s;
      transition: all 0.3s;

      &:hover {
        background: @border-color;
      }
    }
  }

  &-expand {
    vertical-align: middle;
    font-size: 24px;
    margin-top: -10px;
    position: relative;
    top: 2px;
    margin-right: 8px;
    cursor: pointer;

    i {
      color: @text-color-lighter-1;
    }
  }

  .hive-checkbox {
    margin-left: 0;
  }

  a {
    font-size: 12px;
    color: @primary-color;
    letter-spacing: 0.1px;
    cursor: pointer;
  }

  &_page {
    height: 64px;
    background: #fbfbfb;
    text-align: right;
    padding-top: 16px;
    padding-right: 24px;
  }
}
