@import "../../style/function";
@import "common";

.im-table-wrap {
  position: relative;
  border: 1px solid $colorBorder;

  .im-table {
    border-collapse: collapse;
    border-spacing: 0;
    width: 100%;
    table-layout: fixed;

    th, td {
      text-align: left;
      vertical-align: middle;
      word-break: break-all;
      font-size: 14px;
    }

    th {
      color: $color9;
      font-weight: normal;
      height: $tableHeadHeight;
      padding: 0 5px;

      .im-checkbox {
        margin: 0;

        .im-checkbox-icon {
          margin: 0;
        }
      }

      $colorIcon: #bbb;

      .im-icon {
        color: $colorIcon;

        &:hover {
          color: $color9;
        }
      }
    }

    th:first-child {
      padding-left: 20px;
    }

    th:last-child {
      padding-right: 20px;
    }

    td {
      line-height: 150%;
      padding: 15px 5px;
      position: relative;
    }

    td:first-child {
      padding-left: 20px;
    }

    td:last-child {
      padding-right: 20px;
    }

    thead {
      background-color: $tableHeadBgColor;
      border-left: none;
      border-right: none;
      color: $color9;
    }

    tbody {

      tr {
        border-bottom: 1px solid $tableTrBorderColor;
      }

      tr:last-child {
        border: none;
      }

      tr:hover {
        background-color: $tableHoverBgColor;
      }
    }

    &-empty {
      height: 200px;
    }
  }

  .im-table-overlap {
    position: absolute;
    margin: 0;
    padding: 0;
    display: inline-block;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    -ms-transform: translate(-50%, -50%);
    z-index: 2;
  }
}
