#comment-box {
  border-left: 1px solid #e5e6eb;
  padding: 24px 0 60px;
  position: fixed;
  box-sizing: border-box;
  z-index: 98;
  top: 120px;
  right: 0;
  width: 410px;
  height: calc(100vh - 120px);
  transition: transform 250ms ease-out;
  background-color: #fff;
  overflow-y: auto;
  display: none;
}

/* loading */
#comment-loading-wrapper {
  position: fixed;
  z-index: 100;
  top: 120px;
  right: 0;
  width: 410px;
  height: calc(100vh - 120px);
  transition: transform 250ms ease-out;
  background-color: hsla(0, 0%, 100%, 1);
  display: none;
  border-left: 1px solid #e5e6eb;
  right: -100%;
}

#comment-loading-wrapper .comment-loading {
  font-family: PingFangSC-Regular;
  font-weight: 400;
  font-size: 14px;
  height: 100%;
  color: #0d6eff;
  letter-spacing: 0;
  line-height: 22px;
  flex-direction: column;
  display: flex;
  align-items: center;
  justify-content: center;
}

.comment-loading .circular {
  width: 40px;
  height: 40px;
  animation: loading-rotate 2s linear infinite;
  margin-bottom: 8px;
}

.comment-loading .circular .path {
  animation: loading-dash 1.5s ease-in-out infinite;
  stroke-dasharray: 90, 150;
  stroke-dashoffset: 0;
  stroke-width: 2;
  stroke: #0d6eff;
  stroke-linecap: round;
}

@keyframes loading-rotate {
  100% {
    transform: rotate(1turn);
  }
}

.comment-header {
  font-size: 16px;
  font-weight: bold;
  display: flex;
  padding: 0 24px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 27px;
}

.comment-header-left {
  display: flex;
  align-items: center;
  font-weight: 500;
  font-size: 20px;
  color: #1d2129;
  font-family: PingFangSC-Medium;
  letter-spacing: 0;
  line-height: 28px;
}

.comment-number {
  margin-left: 8px;
  font-weight: 400;
  font-size: 14px;
  color: #4e5969;
  letter-spacing: 0;
  line-height: 22px;
  font-family: PingFangSC-Regular;
}

.comment-close {
  width: 24px;
  height: 24px;
  cursor: pointer;
}

.comment-input-wrapper_login {
  display: flex;
  visibility: visible;
  padding: 0 24px;
}

.comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
}

.comment-input {
  flex: 1;
  margin-left: 12px;
  position: relative;
}

.comment-input-reply {
  margin: 12px 0 50px;
}

.comment-input textarea {
  width: 100%;
  border: 1px solid #e5e6eb;
  border-bottom: none;
  box-sizing: border-box;
  border-radius: 4px 4px 0 0;
  padding: 7px 12px 0;
  font-size: 14px;
  color: #1d2129;
  line-height: 22px;
  height: 94px;
  resize: none;
}

.comment-input textarea:focus {
  border-color: #0d6eff;
}

.comment-input textarea:focus + .comment-input-footer {
  border-color: #0d6eff;
}

.comment-input-send_disabled {
  background-color: #e5e6eb;
  cursor: not-allowed;
}

.comment-input-footer {
  display: flex;
  justify-content: flex-end;
  position: absolute;
  align-items: center;
  bottom: -50px;
  right: 0;
  width: 100%;
  background-color: #fff;
  border-radius: 0 0 4px 4px;
  border: 1px solid #e5e6eb;
  border-top: none;
  padding: 12px 12px 12px 0;
  text-align: right;
  box-sizing: border-box;
}

.comment-input-footer-left {
  font-family: PingFangSC-Regular;
  font-weight: 400;
  font-size: 12px;
  color: #8b8b8b;
  letter-spacing: 0;
  line-height: 20px;
}

.comment-input-footer-right {
  margin-left: 12px;
}

.comment-input-send {
  width: 64px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0d6eff;
  border-radius: 2px;
  font-family: PingFangSC-Regular;
  font-weight: 400;
  font-size: 12px;
  color: #ffffff;
  letter-spacing: 0;
  line-height: 20px;
  margin-left: 8px;
  cursor: pointer;
  transition: opacity 250ms ease-out;
  outline: none;
  border: none;
  appearance: none;
}

.comment-input-send_disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.comment-input-send:hover {
  opacity: 0.8;
}

/* 未登录 */
.comment-input-wrapper_unlogin {
  padding: 0 24px;
  /* display: flex; */
  display: none;
}

.comment-avatar_unlogin {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
}

.comment-input_unlogin {
  display: flex;
  flex: 1;
  margin-left: 12px;
  height: 120px;
  justify-content: center;
  flex-direction: column;
  align-items: center;
  border: 1px solid #e5e6eb;
  border-radius: 4px;
  padding: 12px;
}

.comment-input_unlogin-text {
  font-family: PingFangSC-Regular;
  font-weight: 400;
  font-size: 14px;
  color: #8b8b8b;
  letter-spacing: 0;
  line-height: 22px;
}

.comment-input-send_unlogin {
  margin-top: 8px;
  width: 56px;
  height: 28px;
  border: 1px solid #0d6eff;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: PingFangSC-Regular;
  font-weight: 400;
  font-size: 12px;
  color: #0d6eff;
  letter-spacing: 0;
  line-height: 20px;
  cursor: pointer;
  transition: opacity 250ms ease-out;
}

.comment-input-send_unlogin:hover {
  opacity: 0.8;
}

/* comment-list */
.comment-list {
  margin-top: 90px;
}

.comment-list_unlogin {
  margin-top: 40px;
}

.comment-item-wrapper {
  display: flex;
  padding: 0 24px 20px;
}

.comment-item-wrapper-child {
  padding-left: 44px;
}

.comment-item-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
}

.comment-item-content {
  flex: 1;
  margin-left: 12px;
}

.comment-item-content-header {
  font-family: PingFangSC-Regular;
  font-weight: 400;
  font-size: 14px;
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.comment-item-username,
.comment-item-reply-username {
  font-family: PingFangSC-Medium;
  font-weight: 500;
  font-size: 14px;
  color: #1d2129;
  letter-spacing: 0;
  line-height: 22px;
  margin-right: 6px;
}

.comment-item-wrapper-child .comment-item-username,
.comment-item-wrapper-child .comment-item-reply-username {
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comment-item-wrapper-child .comment-item-left-delete {
  margin-left: 8px;
}

.comment-item-is-author {
  width: 36px;
  text-align: center;
  line-height: 20px;
  height: 20px;
  background: #e8f3ff;
  border-radius: 2px;
  font-family: PingFangSC-Regular;
  font-weight: 400;
  font-size: 12px;
  color: #0d6eff;
  letter-spacing: 0;
  line-height: 20px;
}

.comment-item-is-reply {
  margin: 0 8px;
  font-family: PingFangSC-Regular;
  font-weight: 400;
  font-size: 14px;
  color: #8b8b8b;
  letter-spacing: 0;
  line-height: 22px;
}

.comment-item-content-text {
  font-family: PingFangSC-Regular;
  font-weight: 400;
  font-size: 14px;
  color: #1d2129;
  letter-spacing: 0;
  line-height: 22px;
  margin: 0 0 10px 0;
  word-break: break-all;
}

.comment-item-content-text-deleted {
  color: #8b8b8b;
}

.comment-item-content-footer {
  display: flex;
  justify-content: space-between;
  font-family: PingFangSC-Regular;
  font-weight: 400;
  font-size: 12px;
  color: #8b8b8b;
  letter-spacing: 0;
  line-height: 20px;
}

.comment-item-content-footer-left {
  display: flex;
  align-items: center;
  position: relative;
}

.comment-item-left-delete {
  margin-left: 16px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 150ms ease-out;
}
.comment-item-left-delete:hover {
  color: #1d2129;
}

.comment-item-content-delete-confirm {
  display: none;
  position: absolute;
  bottom: 22px;
  left: -8px;
  width: fit-content;
  height: fit-content;
  background: #fff;
  z-index: 100;
  box-sizing: border-box;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #e5e6eb;
  border-radius: 4px;
  box-shadow: 0 0 6px 0 rgba(0, 0, 0, 0.1);
  padding: 14px 10px;
}

.comment-item-content-delete-confirm-text {
  font-family: PingFangSC-Regular;
  font-weight: 400;
  font-size: 12px;
  color: #1d2129;
  letter-spacing: 0;
  line-height: 22px;
}

.comment-item-content-delete-confirm-btn {
  display: flex;
  gap: 10px;
}

.comment-item-content-delete-confirm-btn-cancel,
.comment-item-content-delete-confirm-btn-confirm {
  width: 56px;
  height: 24px;
  border: 1px solid #0d6eff;
  border-radius: 2px;
  cursor: pointer;
  font-family: PingFangSC-Regular;
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0;
  line-height: 20px;
  transition: all 150ms ease-out;
}
.comment-item-content-delete-confirm-btn-cancel {
  background: #fff;
  color: #1d2129;
}

.comment-item-content-delete-confirm-btn-confirm {
  background: #0d6eff;
  color: #fff;
}

.comment-item-content-delete-confirm-btn-cancel:hover,
.comment-item-content-delete-confirm-btn-confirm:hover {
  opacity: 0.8;
}

.comment-item-wrapper-author:hover .comment-item-left-delete {
  opacity: 1;
}

.comment-item-content-footer-right {
  display: flex;
  align-items: center;
}

.comment-item-content-footer-right-reply {
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: opacity 150ms ease-out;
}

.comment-item-content-footer-right-reply:hover,
.comment-item-content-footer-right-like:hover {
  color: #1d2129;
}

.comment-item-content-footer-right-like {
  display: flex;
  align-items: center;
  margin-left: 16px;
  cursor: pointer;
  transition: opacity 150ms ease-out;
}

.comment-item-content-footer-thumb-count {
  margin-left: 4px;
}

.comment-item-content-footer-right-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  margin-right: 4px;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center center;
}

.comment-item-right-icon-reply {
  background-image: url('https://cloudpnrcdn.oss-cn-shanghai.aliyuncs.com/dgwebsite/open-public/docs/images/icons/icon-reply.svg');
}

.comment-item-right-icon-like {
  background-image: url('https://cloudpnrcdn.oss-cn-shanghai.aliyuncs.com/dgwebsite/open-public/docs/images/icons/icon-like.png');
  transition: all 0.15s ease-out;
}

.comment-item-content-footer-right-reply:hover .comment-item-right-icon-reply {
  background-image: url('https://cloudpnrcdn.oss-cn-shanghai.aliyuncs.com/dgwebsite/open-public/docs/images/icons/icon-reply-active.svg');
}

.comment-item-content-footer-right-like:hover .comment-item-right-icon-like {
  background-image: url('https://cloudpnrcdn.oss-cn-shanghai.aliyuncs.com/dgwebsite/open-public/docs/images/icons/icon-like-hover.png');
}

.comment-item-right-icon-like-active {
  background-image: url('https://cloudpnrcdn.oss-cn-shanghai.aliyuncs.com/dgwebsite/open-public/docs/images/icons/icon-like-active.png');
  transform: scale(1.1);
}

.comment-item-content-footer-right-like-active,
.comment-item-content-footer-right-like-active:hover {
  color: #0d6eff;
}

.comment-item-content-footer-right-like-active:hover
  .comment-item-right-icon-like {
  background-image: url('https://cloudpnrcdn.oss-cn-shanghai.aliyuncs.com/dgwebsite/open-public/docs/images/icons/icon-like-active.png');
}

.comment-no-more {
  font-family: PingFangSC-Regular;
  font-weight: 400;
  font-size: 14px;
  color: #8b8b8b;
  letter-spacing: 0;
  line-height: 22px;
  margin: 20px 0;
  text-align: center;
}

.comment-load-more {
  font-family: PingFangSC-Regular;
  font-weight: 400;
  font-size: 14px;
  color: #8b8b8b;
  letter-spacing: 0;
  line-height: 22px;
  margin: 20px 0;
  text-align: center;
  color: #0d6eff;
}

/* 展开回复 */
.show-all-replies {
  cursor: pointer;
  color: #0d6eff;
  padding: 0 0 24px;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 44px;
}

.show-replies-icon {
  transition: transform 0.1s linear;
  background-image: url('https://cloudpnrcdn.oss-cn-shanghai.aliyuncs.com/dgwebsite/open-public/docs/images/icons/icon-up.svg');
  transform: rotate(180deg);
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.show-all-replies:hover {
  opacity: 0.9;
}

.hidden-replies {
  transition: all 0.1s linear;
}

/* 评论自动展开高亮 */
.comment-item-highlight {
  animation: highlight-pulse 1.5s linear;
}

@keyframes highlight-pulse {
  0% {
    background: #ffffff;
  }
  100% {
    background:rgb(220, 237, 255);
  }
}
