$--app-config-status-draft: #a5a5a5;
$--app-config-status-approving: #ffcd00;
$--app-config-status-completed: #44db5e;
$--app-config-status-refused: #ff3824;
$--app-config-status-terminated: #8e1ec7;

.x-associated-table {
  position: relative;
  width: 100%;

  .table-header {
    position: relative;
    height: 40px;
    padding-left: 40px;
    font-size: 12px;
    font-weight: bold;
    line-height: 40px;
    border: 1px solid #eaeef5;
    border-bottom: 0;
    border-radius: 2px 0;

    .icon {
      position: absolute;
      top: 0;
      left: 8px;
      display: flex;
      height: 40px;
      align-items: center;
    }

    .btn-box {
      position: absolute;
      top: 0;
      right: 12px;
      display: flex;
      height: 40px;
      align-items: center;

      .add-associated {
        display: flex;
        width: 48px;
        height: 24px;
        padding: 0 !important;
        font-size: 12px;
        border-radius: 2px;
        box-sizing: border-box;
        justify-content: center;
        align-items: center;
      }
    }
  }
  .x-loading-border-hide {
    border: 0 !important;
  }
  .x-loading {
    display: flex;
    height: auto;
    min-height: 174px;
    border: 1px solid #eaeef5;
    justify-content: center;
    // img {
    //   position: absolute;
    //   top: -150px;
    //   left: 50%;
    //   transform: translateX(-50%);
    // }
    .x-block-table {
      width: 100%;
      .pagination {
        padding-top: 12px;
        // 抽屉详情里关联表单上下边距应为8 + 4 = 12px，所以这里分页也要做判断
        padding-bottom: 0;
      }
    }
    .el-table {
      font-size: 12px;
      border-top: 1px solid #eaeef5 !important;
      border-left: 1px solid #eaeef5 !important;
      border-radius: 0 2px;

      .table-empty {
        display: flex;
        height: 132px;
        align-items: center;
        justify-content: center;
      }

      .status-tag {
        display: inline-block;
        height: 22px;
        padding: 0 7px;
        color: #fff;
        background-color: red;
        border-radius: 4px;
      }

      .associated-td {
        display: flex;
        cursor: pointer;
        align-items: center;

        span {
          margin-left: 8px;
        }
      }

      .status-tag-draft {
        background-color: $--app-config-status-draft;
      }

      .status-tag-approving {
        background-color: $--app-config-status-approving;
      }

      .status-tag-completed {
        background-color: $--app-config-status-completed;
      }

      .status-tag-refused {
        background-color: $--app-config-status-refused;
      }

      .status-tag-terminated {
        background-color: $--app-config-status-terminated;
      }

      .x-block-table .el-table .el-table__header tr >th {
        height: 40px;
      }

      .x-block-table .el-table .el-table__body tr >td {
        height: 40px;
      }

      .x-block-table .el-table .el-table__footer tr >td {
        height: 40px;
      }

      .x-block-table {
        .el-table__body-wrapper {
          position: initial !important;
        }

        .table-empty {
          display: flex;
          height: 132px;
          align-items: center;
          justify-content: center;

          .empty-scroll {
            z-index: 10;
            width: 100%;
            height: 100%;
          }

          .empty-block {
            position: absolute !important;
            right: calc(50% - 50px);
            height: 100%;
            margin-top: 6px;
          }
        }

        .el-table {
          font-size: 12px;
          color: #303030;

          thead {
            color: #303030;
          }

          .el-table__header-wrapper,
          .el-table__fixed-header-wrapper {
            tr {
              background-color: #fafafa;
            }

            th {
              font-weight: bold;
              background-color: #fafafa;

              .cell {
                padding-right: 16px;
                padding-left: 16px;
              }
            }
          }

          .el-table__footer-wrapper,
          .el-table__fixed-footer-wrapper {
            tr {
              background-color: #fafafa;
            }

            td {
              background-color: #fafafa;

              .cell {
                padding-right: 16px;
                padding-left: 16px;

                .statistic-seq-footer {
                  position: absolute;
                  top: 8px;
                  left: 12px;
                  font-style: italic;
                }
              }
            }
          }

          .el-table__body {
            .el-table__row {
              .cell {
                padding-right: 16px;
                padding-left: 16px;

                .table-money-slot {
                  display: block;
                  overflow: hidden;
                  text-align: right;
                  text-overflow: ellipsis;
                }
              }
            }
          }
        }
      }

      .table-line-tag-people-box {
        .x-tag-group {
          margin-left: -4px !important;
        }
      }

      .table-line-tag-box {
        .x-tag-group {
          width: 90%;
          margin-left: -8px;
          .x-person-avatar {
            position: relative !important;
            .img-avatar {
              position: absolute;
              top: 0;
              left: 50%;
              transform: translateX(-50%);
            }
          }
        }
        .table-line-tag {
          display: inline-block;
          height: 24px;
          padding: 0 8px;
          margin-left: 4px;
          font-size: 12px;
          line-height: 24px;
          color: #fff;
          cursor: default;
          border: 0;
          border-radius: 14px;
        }
      }
    }
  }
  .loading-box {
    height: 174px;
    border: 1px solid #eaeef5;
  }
}
