.tntd-checkcard {
  position: relative;
  display: inline-block;
  width: 320px;
  margin-inline-end: 16px;
  margin-block-end: 16px;
  color: rgba(0, 0, 0, 0.88);
  font-size: 14px;
  line-height: 1.5714285714285714;
  vertical-align: top;
  background-color: #ffffff;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s;

  &:last-child {
    margin-inline-end: 0;
  }
  & + .tntd-checkcard {
    margin-inline-start: 0 !important;
  }
  .tntd-checkcard-loading {
    overflow: hidden;
    user-select: none;
  }
  .tntd-checkcard-loading-content {
    padding-inline: 16px;
    padding-block: 12px;
    p {
      margin-block: 0;
      margin-inline: 0;
    }
    .tntd-checkcard-loading-block {
      height: 14px;
      margin-block: 4px;
      background: linear-gradient(
        90deg,
        rgba(54, 61, 64, 0.2),
        rgba(54, 61, 64, 0.4),
        rgba(54, 61, 64, 0.2)
      );
      animation-name: card-loading;
      animation-duration: 1.4s;
      animation-timing-function: ease;
      animation-iteration-count: infinite;
    }
  }
  &:not(.tntd-checkcard-disabled):hover {
    border-color: @primary-color;
  }
}
.tntd-checkcard-bordered {
  border: 1px solid #d9d9d9;
}
.tntd-checkcard-group {
  display: inline-block;
}
// @keyframes {
//   card-loading {
//     0% {
//       background-position: 0 50%;
//     }
//   }
//   50% {
//     background-position: 100% 50%;
//   }
//   100% {
//     background-position: 0 50%;
//   }
// }
.tntd-checkcard {
  &:focus {
    background-color: #bae0ff;
    border-color: @primary-color;
  }
}
.tntd-checkcard-checked {
  background-color: #bae0ff;
  border-color: @primary-color;

  &:after {
    position: absolute;
    inset-block-start: 2px;
    inset-inline-end: 2px;
    width: 0;
    height: 0;
    border: 6px solid @primary-color;
    border-block-end: 6px solid transparent;
    border-inline-start: 6px solid transparent;
    border-start-end-radius: 2px;
    content: '';
  }
}
.tntd-checkcard-disabled {
  background-color: rgba(0, 0, 0, 0.04);
  border-color: #d9d9d9;
  cursor: not-allowed;
  .tntd-checkcard-description {
    color: rgba(0, 0, 0, 0.25);
  }
  .tntd-checkcard-title {
    color: rgba(0, 0, 0, 0.25);
  }
  .tntd-checkcard-avatar {
    opacity: 0.25;
  }
}
.tntd-checkcard.tntd-checkcard-disabled {
  background-color: rgba(0, 0, 0, 0.04);
  border-color: #d9d9d9;
  cursor: not-allowed;

  .tntd-checkcard-description {
    color: rgba(0, 0, 0, 0.25);
  }
  .tntd-checkcard-title {
    color: rgba(0, 0, 0, 0.25);
  }
  .tntd-checkcard-avatar {
    opacity: 0.25;
  }
}
.tntd-checkcard-lg {
  width: 440px;
}
.tntd-checkcard-sm {
  width: 212px;
}
.tntd-checkcard-cover {
  padding-inline: 4px;
  padding-block: 4px;
  img {
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 4px;
  }
}

.tntd-checkcard-content {
  display: flex;
  padding-inline: 12px;
  padding-block: 16px;
}
.tntd-checkcard-avatar-header {
  display: flex;
  align-items: center;
}
.tntd-checkcard-avatar {
  padding-inline-end: 8px;
}
.tntd-checkcard-detail {
  overflow: hidden;
  width: 100%;
  & > div {
    &:not(:last-child) {
      margin-block-end: 4px;
    }
  }
}
.tntd-checkcard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.tntd-checkcard-title {
  overflow: hidden;
  color: rgba(0, 0, 0, 0.88);
  font-weight: 500;
  font-size: 14px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.tntd-checkcard-description {
  color: rgba(0, 0, 0, 0.65);
  p:last-child {
    margin-bottom: 0;
  }
}
