/* Shared compact comments for model and blog detail pages */
.comment-section {
  margin-top: 42px !important;
  padding: 20px !important;
  border: 1px solid #e1e6ee !important;
  border-radius: 14px !important;
  background: #fff !important;
  box-shadow: 0 14px 34px rgba(17, 24, 39, .05) !important;
}

.comment-section h5 {
  margin: 0 0 14px !important;
  color: #20242a !important;
  font-size: 1rem !important;
  font-weight: 500 !important;
}

.comment-section .d-flex.flex-row.align-items-start {
  gap: 12px !important;
  align-items: flex-start !important;
}

.comment-section form.flex-grow-1,
.comment-section .form-group,
.comment-section .form-group p {
  margin: 0 !important;
}

.comment-section textarea,
.reply-form textarea {
  width: 100% !important;
  min-height: 104px !important;
  padding: 14px 16px !important;
  color: #242932 !important;
  font-size: .94rem !important;
  line-height: 1.45 !important;
  resize: vertical;
  background: #f8f9fb !important;
  border: 1px solid #d9dee6 !important;
  border-radius: 12px !important;
  transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.comment-section textarea:focus,
.reply-form textarea:focus {
  background: #fff !important;
  border-color: #aeb6c0 !important;
  box-shadow: 0 0 0 3px rgba(17, 24, 39, .07) !important;
  outline: 0 !important;
}

.leave-comment,
.reply-submit {
  min-height: 40px !important;
  padding: 9px 18px !important;
  color: #fff !important;
  font-size: .92rem !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
  background: #111 !important;
  border: 1px solid #111 !important;
  border-radius: 10px !important;
  box-shadow: 0 10px 22px rgba(17, 24, 39, .1) !important;
  transition: transform .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .18s ease !important;
}

.leave-comment:hover,
.reply-submit:hover {
  background: #2e333a !important;
  border-color: #2e333a !important;
  box-shadow: 0 12px 26px rgba(17, 24, 39, .14) !important;
  transform: translateY(-1px) !important;
}

.custom-comments {
  color: #3a4048 !important;
  border-bottom: 1px solid #dfe4eb !important;
  font-size: .86rem !important;
  letter-spacing: .02em;
}

#comment-filter-form {
  border-bottom: 1px solid #dfe4eb !important;
}

.sort-comments {
  height: 28px !important;
  padding: 0 24px 0 8px !important;
  color: #59616d !important;
  font-size: .86rem !important;
  font-weight: 500 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 8px !important;
}

.comments .comment {
  margin: 14px 0 0 !important;
}

.comments .comment-row {
  display: grid !important;
  grid-template-columns: 64px minmax(0, 1fr) !important;
  gap: 12px !important;
  align-items: flex-start !important;
  margin: 0 !important;
  padding: 0 !important;
}

.comment-author-side {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 5px !important;
  width: 64px !important;
  min-width: 64px !important;
}

.comment-author-side .comment-avatar-shell,
.comment-author-side .comment-avatar {
  width: 46px !important;
  height: 46px !important;
}

.comment-author-side .comment-avatar-shell {
  margin: 0 !important;
}

.comment-author-side .comment-avatar {
  margin: 0 !important;
  object-fit: cover !important;
}

.comment-author-role {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  align-self: center !important;
  width: 46px !important;
  max-width: 46px !important;
  min-height: 14px;
  margin: 0 auto !important;
  color: #6f7884;
  font-size: .6rem;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.comment-author-role {
  transform: translateX(0);
}

.comment-inline-stats {
  display: inline-flex !important;
  align-items: center !important;
  flex: 0 0 auto !important;
  transform: translateY(2px);
}

.comment-inline-stats .avatar-stats--comment {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  width: auto;
  max-width: none;
  margin: 0;
  gap: 3px;
}

.comment-inline-stats .avatar-stats--comment .avatar-stat {
  height: 14px;
  min-width: 19px;
  padding: 0 3px;
  color: #737d88;
  font-size: .52rem;
  font-weight: 600;
  background: #fff;
  border: 1px solid #dfe5ec;
  box-shadow: 0 2px 6px rgba(17, 24, 39, .045);
  gap: 2px;
}

.comment-inline-stats .avatar-stats--comment .avatar-stat i {
  color: #8a93a0;
  font-size: .5rem;
}

.comment-body {
  min-width: 0 !important;
}

.comment-meta {
  min-width: 0 !important;
  margin: 0 0 24px 1px !important;
}

.comments .comment-card {
  min-width: 0 !important;
  padding: 10px 12px 8px !important;
  background: #fff !important;
  border: 1px solid #e2e7ee !important;
  border-radius: 13px !important;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease !important;
}

.comments .comment-card:hover {
  border-color: #cfd5dd !important;
  box-shadow: 0 10px 24px rgba(17, 24, 39, .055) !important;
}

.comment-card-head {
  display: flex !important;
  justify-content: flex-end !important;
  min-height: 14px;
  margin: -2px 0 4px !important;
}

.comment-header {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  min-width: 0 !important;
}

.comment-author {
  margin: 0 !important;
  color: #242932 !important;
  font-size: .95rem !important;
  font-weight: 600 !important;
  line-height: 1.25 !important;
  text-decoration: none !important;
}

.comment-author:hover {
  color: #111 !important;
}

.comment-author-status {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin-top: 2px !important;
  padding-left: 9px !important;
  color: #7d8794 !important;
  font-size: .77rem !important;
  font-style: italic !important;
  line-height: 1.25 !important;
  border-left: 2px solid #d9dee6 !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.comment-author-status::before {
  content: "";
}

.comment-time-stamp {
  color: #87919d !important;
  font-size: .68rem !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
}

.comment-time-stamp i {
  font-size: .92em !important;
}

.comment-comment,
.comment-comment p {
  margin: 0 !important;
  color: #4c5562 !important;
  font-size: .91rem !important;
  line-height: 1.45 !important;
}

.reply-to + .comment-comment,
.reply-to + .comment-comment p {
  margin-top: 7px !important;
}

.comment-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
  gap: 6px 8px !important;
  width: 100% !important;
  margin-top: 10px !important;
  padding-top: 8px !important;
  border-top: 1px solid rgba(148, 163, 184, .28) !important;
}

.comment-section .comments .comment-actions .comment-rating-row {
  display: inline-flex !important;
  grid-template-columns: none !important;
  align-items: center !important;
  justify-content: flex-start !important;
  flex: 0 0 auto !important;
  gap: 3px 5px !important;
  margin: 0 !important;
  width: max-content !important;
  max-width: 100% !important;
  order: 2 !important;
}

.comment-section .comments .comment-actions .comment-rating-row .likes-count,
.comment-section .comments .comment-actions .comment-rating-row .dislikes-count {
  display: inline-flex !important;
  align-items: center !important;
  min-width: 10px !important;
  margin: 0 !important;
  line-height: 1 !important;
}

.comment-secondary-actions {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  grid-column: auto !important;
  flex: 1 1 100% !important;
  order: 1 !important;
  width: 100% !important;
}

.comment-reaction-button,
.comment-report-button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 20px !important;
  padding: 0 !important;
  color: #8c949e !important;
  background: #f3f5f7 !important;
  border: 1px solid #e0e4ea !important;
  border-radius: 50% !important;
  cursor: pointer !important;
  transition: transform .18s ease, color .18s ease, background-color .18s ease, border-color .18s ease !important;
}

.comment-reaction-button {
  width: 20px !important;
  border-radius: 50% !important;
}

.comment-report-button {
  width: auto !important;
  gap: 3px !important;
  order: 30 !important;
  margin-left: auto !important;
  padding: 0 6px !important;
  color: #9aa3ad !important;
  background: #f8f9fb !important;
  border-color: #e5e9ef !important;
  font-size: .66rem !important;
  font-weight: 500 !important;
  border-radius: 999px !important;
  opacity: .82 !important;
}

.comment-reaction-button i,
.comment-report-button i {
  margin: 0 !important;
  color: inherit !important;
  font-size: .6rem !important;
}

.comment-reaction-button:hover,
.comment-reaction-button.active {
  color: #111 !important;
  background: #fff !important;
  border-color: #c3cad3 !important;
  transform: scale(1.05) !important;
}

.comment-report-button:hover,
.comment-report-button.active {
  color: #5d6672 !important;
  background: #f1f3f6 !important;
  border-color: #d7dde5 !important;
  opacity: 1 !important;
  transform: translateY(-1px) !important;
}

.comment-admin-actions {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  order: 10 !important;
  margin-left: 0 !important;
}

.comment-moderation-button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  min-height: 20px !important;
  padding: 0 6px !important;
  color: #6f7884 !important;
  background: #fff !important;
  border: 1px solid #dfe5ec !important;
  border-radius: 999px !important;
  font-size: .66rem !important;
  font-weight: 500 !important;
  line-height: 1 !important;
  cursor: pointer !important;
  opacity: .9 !important;
  transition: transform .18s ease, color .18s ease, background-color .18s ease, border-color .18s ease, opacity .18s ease !important;
}

.comment-moderation-button i {
  margin: 0 !important;
  color: inherit !important;
  font-size: .66rem !important;
}

.comment-moderation-button:hover,
.comment-moderation-button.loading {
  color: #20242a !important;
  background: #eef1f4 !important;
  border-color: #cbd3dc !important;
  opacity: 1 !important;
  transform: translateY(-1px) !important;
}

.comment-moderation-button-danger:hover,
.comment-moderation-button-danger.loading {
  color: #fff !important;
  background: #2e333a !important;
  border-color: #2e333a !important;
}

.likes-count,
.dislikes-count {
  color: #79828e !important;
  font-size: .72rem !important;
}

.reply-button {
  order: 0 !important;
  margin: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 20px !important;
  padding: 0 8px !important;
  color: #5f6975 !important;
  font-size: .7rem !important;
  font-weight: 500 !important;
  line-height: 1 !important;
  background: #f6f7f9 !important;
  border: 1px solid #e0e5eb !important;
  border-radius: 999px !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .75) !important;
  text-decoration: none !important;
  cursor: pointer !important;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease !important;
}

.reply-button:hover {
  color: #343a43 !important;
  background: #eceff3 !important;
  border-color: #d4dae2 !important;
  transform: translateY(-1px) !important;
}

.comment-section .comments .comment > .replies {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  margin: 16px 0 0 76px !important;
  padding-left: 14px !important;
  border-left: 1px solid #e4e8ee !important;
}

.comment-section .comments .replies > .comment {
  margin: 0 !important;
}

.comment-section .comments .replies .replies {
  margin: 12px 0 0 0 !important;
  padding-left: 0 !important;
  border-left: 0 !important;
}

.comment-section .comments .replies .comment-row {
  grid-template-columns: 54px minmax(0, 1fr) !important;
  gap: 10px !important;
}

.comment-section .comments .replies .comment-author-side {
  width: 54px !important;
  min-width: 54px !important;
}

.comment-section .comments .replies .comment-avatar-shell,
.comment-section .comments .replies .comment-avatar {
  width: 42px !important;
  height: 42px !important;
}

.comment-section .comments .replies .comment-author-role {
  width: 42px !important;
  max-width: 42px !important;
}

.comment-section .comments .replies .comment-meta {
  margin-bottom: 18px !important;
}

.reply-form {
  display: none !important;
  margin-top: 12px !important;
  padding: 12px !important;
  background: #f8f9fb !important;
  border: 1px solid #e2e7ee !important;
  border-radius: 12px !important;
}

.comment-section .comments .replies > .comment + .comment {
  padding-top: 2px !important;
}

.reply-form.is-open {
  display: block !important;
}

.reply-form textarea {
  min-height: 78px !important;
}

.reply-to {
  margin: 0 0 7px !important;
  padding: 6px 9px !important;
  color: #626b77 !important;
  font-size: .8rem !important;
  line-height: 1.35 !important;
  background: #f7f8fa !important;
  border-left: 2px solid #9aa2ad !important;
  border-radius: 8px !important;
}

.reply-to .replier {
  color: #1f2933 !important;
  font-weight: 600 !important;
  text-decoration: none !important;
}

@media (max-width: 768px) {
  .comment-section {
    margin-top: 32px !important;
    padding: 16px !important;
  }

  .comment-section textarea,
  .reply-form textarea {
    min-height: 92px !important;
  }

  .comment-section .comments .comment > .replies {
    margin-left: 42px !important;
    padding-left: 10px !important;
  }
}

@media (max-width: 575.98px) {
  .comment-section {
    padding: 14px !important;
    border-radius: 12px !important;
  }

  .comment-section .d-flex.flex-row.align-items-start {
    gap: 10px !important;
  }

  .comments .comment-row {
    grid-template-columns: 48px minmax(0, 1fr) !important;
    gap: 9px !important;
  }

  .comment-author-side {
    width: 48px !important;
    min-width: 48px !important;
  }

  .comment-author-side .comment-avatar-shell,
  .comment-author-side .comment-avatar {
    width: 38px !important;
    height: 38px !important;
  }

  .comment-author-role {
    width: 42px !important;
    max-width: 42px !important;
    font-size: .54rem;
  }

  .comment-inline-stats .avatar-stats--comment .avatar-stat {
    font-size: .46rem;
  }

  .comment-section .comments .replies .comment-row {
    grid-template-columns: 44px minmax(0, 1fr) !important;
    gap: 8px !important;
  }

  .comment-section .comments .replies .comment-author-side {
    width: 44px !important;
    min-width: 44px !important;
  }

  .comment-section .comments .replies .comment-avatar-shell,
  .comment-section .comments .replies .comment-avatar {
    width: 36px !important;
    height: 36px !important;
  }

  .comment-section .comments .replies .comment-author-role {
    width: 36px !important;
    max-width: 36px !important;
  }

  .comments .comment-card {
    padding: 10px !important;
  }

  .comment-author-status {
    max-width: 100%;
  }

  .comment-actions {
    gap: 6px !important;
  }

  .comment-report-button span {
    display: none !important;
  }

  .comment-moderation-button span {
    display: none !important;
  }

  .comment-moderation-button {
    width: 22px !important;
    padding: 0 !important;
  }

  .leave-comment,
  .reply-submit {
    width: 100% !important;
  }
}
