/* Comment section */

.comment-section {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.comment-section__title {
  margin: 0;
  color: var(--text-primary);
  font-size: 24px;
  font-family: PingFang SC, sans-serif;
  font-weight: 500;
  line-height: 32px;
}

.comment-form {
  padding: 24px 16px;
  border-radius: 12px;
  border: 1px solid var(--color-black-alpha-5);
  background: var(--surface-input);
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 18px;
}

.comment-form__textarea {
  width: 100%;
  min-height: 88px;
  border: none;
  outline: none;
  resize: vertical;
  background: transparent;
  color: var(--text-primary);
  font-size: 16px;
  font-family: PingFang SC, sans-serif;
  font-weight: 400;
  line-height: 18px;
}

.comment-form__submit {
  padding: 13px 36px;
  border: 1px solid var(--color-primary-500);
  border-radius: 4px;
  background: var(--color-primary-500);
  color: #fff;
  font-size: 13px;
  font-family: PingFang SC, sans-serif;
  font-weight: 400;
  line-height: 20px;
  cursor: pointer;
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.comment-list__count {
  margin: 0;
  color: var(--text-secondary);
  font-size: 20px;
  font-family: PingFang SC, sans-serif;
  font-weight: 400;
  line-height: 28px;
}

.comment-thread {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.comment-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.comment-item--reply {
  padding-left: 48px;
}

.comment-item__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--color-neutral-200);
}

.comment-item--reply .comment-item__avatar {
  width: 24px;
  height: 24px;
}

.comment-item__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.comment-item__name {
  color: var(--color-primary-500);
  font-size: 16px;
  font-family: PingFang SC, sans-serif;
  font-weight: 500;
  line-height: 20px;
}

.comment-item__text {
  margin: 0;
  color: var(--text-primary);
  font-size: 16px;
  font-family: PingFang SC, sans-serif;
  font-weight: 400;
  line-height: 20px;
}

.comment-item__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.comment-item__time {
  color: var(--text-secondary);
  font-size: 14px;
  font-family: PingFang SC, sans-serif;
  font-weight: 400;
  line-height: 18px;
}

.comment-item__reply {
  border: none;
  background: transparent;
  padding: 0;
  color: var(--color-primary-500);
  font-size: 14px;
  font-family: PingFang SC, sans-serif;
  font-weight: 400;
  line-height: 18px;
  cursor: pointer;
}

.comment-item__toggle-group {
  display: flex;
  align-items: center;
  gap: 29px;
}

.comment-item__toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: transparent;
  padding: 0;
  color: var(--text-secondary);
  font-size: 12px;
  font-family: PingFang SC, sans-serif;
  font-weight: 500;
  line-height: 18px;
  cursor: pointer;
}

.comment-item__toggle-line {
  width: 20px;
  height: 1px;
  background: var(--text-secondary);
  border-radius: 0.5px;
}

.comment-item__toggle img {
  width: 18px;
  height: 18px;
}

.comment-list__end {
  opacity: 0.3;
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
  font-family: PingFang SC, sans-serif;
  font-weight: 500;
  line-height: 18px;
}

@media (max-width: 768px) {
  .comment-section {
    gap: 12px;
    width: 100%;
  }

  .comment-section__title {
    font-size: 16px;
    font-weight: 500;
    line-height: 22px;
  }

  .comment-form {
    padding: 18px 12px;
    gap: 12px;
    border-radius: 12px;
    border-color: rgba(0, 0, 0, 0.05);
    width: 100%;
  }

  .comment-form__textarea {
    min-height: 88px;
    font-size: 14px;
    line-height: 20px;
  }

  .comment-form__submit {
    padding: 10px 24px;
    border-radius: 999px;
    font-size: 13px;
    line-height: 20px;
  }

  .comment-list {
    gap: 12px;
  }

  .comment-list__count {
    font-size: 14px;
    line-height: 20px;
    color: #3d3d3d;
  }

  .comment-item__name {
    font-size: 14px;
  }

  .comment-item__text {
    color: #292929;
    font-size: 14px;
  }

  .comment-item__time {
    color: #757575;
    font-size: 12px;
  }

  .comment-item__toggle {
    color: #bdbdbd;
  }

  .comment-item__toggle-line {
    background: #bdbdbd;
  }

  .comment-item--reply {
    padding-left: 0;
    font-size: 12px;
  }

  .comment-item--reply .comment-item__avatar {
    width: 24px;
    height: 24px;
  }
  .comment-list__end {
    font-size: 12px;
  }
}
