/**
 * Table Component Style for SaltUI
 * @author sujingjing
 *
 * Copyright 2018-2019, SaltUI Team.
 * All rights reserved.
 */
$table-split-line-color = $normal-alpha-6;
$table-header-color = $normal-alpha-7;
$tablePrefixCls = t-table;

.{$tablePrefixCls} {
  width: 100%;
  overflow: hidden;
  line-height: 18px;

  &-content-container {
    line-height: 0;
  }

  &-pager {
    margin-top: 12px;
  }
}

.{$tablePrefixCls}-left-fixed,
.{$tablePrefixCls}-right-fixed {
  top: 0;
  transition: box-shadow 0.3s ease-out;
}

.{$tablePrefixCls}-left-fixed {
  left: 0;
  background: white;
  &.{$tablePrefixCls}-fixed__has-scroll {
    box-shadow: 1px 0 4px rgba(100, 100, 100, 0.2);
  }
}


.{$tablePrefixCls}-right-fixed {
  right: 0;
  background #fff;
  &.{$tablePrefixCls}-fixed__has-scroll {
    box-shadow: -1px 0 4px rgba(100, 100, 100, 0.2);
  }
  &.only-arrow {
    .{$tablePrefixCls}-header {
      background #fff
      .{$tablePrefixCls}-header-main{
        height 100%
        background $table-header-color
      }
    }
    .{$tablePrefixCls}-body {
      background none
    }
  }
}
.{$tablePrefixCls} {
  &.t-sub-table {
    .{$tablePrefixCls}-right-fixed {
      .{$tablePrefixCls}-body,
      .{$tablePrefixCls}-header {
        //hairline border-left $table-split-line-color
      }
      //box-shadow none
      //&.only-arrow {
      //  box-shadow none
      //}
    }
    .{$tablePrefixCls}-left-fixed {
      .{$tablePrefixCls}-body,
      .{$tablePrefixCls}-header {
        //hairline border-right $table-split-line-color
      }
      //box-shadow none
    }
    .{$tablePrefixCls}-body {
      .{$tablePrefixCls}-row:last-child {
        hairline: border-bottom $table-split-line-color;
      }
    }
    .{$tablePrefixCls}-pager {
      margin-bottom 12px
    }

    .sub-table-back {
      line-height 40px
      height 40px
      text-align left
      padding-left 20px
      color $brand-primary
      cursor pointer
    }
  }
}

.{$tablePrefixCls}-header {
  //hairline: border-bottom $table-split-line-color;
  height: 40px;
  line-height: 39px;
  white-space: nowrap;
  background #fff
  .{$tablePrefixCls}-header-main {
    height 100%
    background $table-header-color
  }
}

.{$tablePrefixCls}-header-item {
  border-right: none;
  color: $normal-alpha-3;
}

.{$tablePrefixCls}-header-item:last-child {
  border-right: none;
}

.{$tablePrefixCls}-body {
  white-space: nowrap;
  .{$tablePrefixCls}-left-fixed & {
    color: $normal-alpha-3;
    background $table-header-color
    border-right: none;
  }
  .{$tablePrefixCls}-right-fixed & {
    color: $normal-alpha-3;
    background $table-header-color
  }
}

.{$tablePrefixCls}-row {
  hairline: border-bottom $table-split-line-color;
  white-space: nowrap;
  height: 40px;
}

.t-popup {
  .{$tablePrefixCls}-row:last-child {
    border-bottom: none;
  }
}

.{$tablePrefixCls}-row-item {
  min-height: 40px;
  height: 100%;
  border-right: none;
  font-size: 12px;
  line-height: 40px;
  color: $dark-alpha-3;
}
.{$tablePrefixCls}-row-item-icon {
  position relative
  top 5px
  svg {
    fill $normal-alpha-3;
  }
}

.{$tablePrefixCls}-left-fixed .{$tablePrefixCls}-body .{$tablePrefixCls}-row-item {
  color: $normal-alpha-3;
}

.{$tablePrefixCls}-row-item:last-child {
  border-right: none;
}

.{$tablePrefixCls}-empty-content {
  line-height: 40px;
}

.{$tablePrefixCls}-scroller {
  overflow: hidden;
}

.{$tablePrefixCls}-scroller .{$tablePrefixCls}-body,
.{$tablePrefixCls}-scroller .{$tablePrefixCls}-header {
  border-right: none;
}

.{$tablePrefixCls} {
  &.hide-rows-split-line {
    .{$tablePrefixCls}-header-item,
    .{$tablePrefixCls}-row-item,
    .{$tablePrefixCls}-left-fixed .{$tablePrefixCls}-body {
      border-right: none;
    }
    .{$tablePrefixCls}-row {
      border-bottom: none
    }
    //.{$tablePrefixCls}-header {
    //  border-bottom: none
    //}
  }
}
