@import '../scss/base';

.r-table{
  position: relative;
  background-color: $color-white;

  .all-checkeds{
    margin-bottom: 5px;

    a{
      cursor: pointer;
      margin-left: 5px;
    }

    .all-checkeds-tags{
      margin-top: 5px;
      max-height: 100px;
      overflow: auto;
    }
  }
  
  table{
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
  }

  tr{
    &:hover{
      background-color: $color-white-light;
    }

    &:last-child{
      // td,th{
      //   border-bottom: 0;
      // }
    }
  }

  th{
    background-color: $color-white-light;
    position: relative;
    font-weight: 500;

    div{
      display: inline-flex;
      align-items: center;
    }

    .r-table-sort{
      margin-left: 10px;
      color: $color-gray;

      display: inline-flex;
      flex-direction: column;

      .r-icon{
        display: inline-flex;
        flex-direction: column;
        font-size: 12px;
        cursor: pointer;

        &:hover{
          color: $color-black;
        }
      }

      .r-table-sort-active{
        color: $color-primary;
      }
    }
  }

  th, td{
    text-align: left;
    padding: 10px 0;
    vertical-align: middle;
    border-bottom: 1px solid $color-border;

    >div{
      padding-left: 10px;
      padding-right: 10px;
      word-break: break-all;
    }
  }

  .no-data-text{
    &:hover{
      background-color: transparent;
    }

    div{
      text-align: center;
      line-height: 80px;
      height: 80px;
    }
  }

  .summary{
    background-color: $color-white-light;
  }

  .r-table-expand-row{
    &:hover{
      background-color: transparent;
    }
  }
}

.r-table-checkbox, .r-table-radio{
  .r-icon{
    font-size: 18px;
  }
}

.r-table-border{
  border: 1px solid $color-border;

  th, td{
    border-right: 1px solid $color-border;

    &:last-child{
      border-right: 0;
    }
  }
}

.r-table-expand-switch{
  display: inline-block;
  width: 100%;
  &:hover{
    color: $color-primary;
  }
}