/* Ajustes finais da área de comentários. */

/* Usuário deslogado: exibe apenas o botão de entrada. */
.comments-section .comment-login-box {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin: 24px 0 34px;
}

.comments-section .comment-login-box p {
  display: none !important;
}

.comments-section .comment-login-box .btn {
  margin: 0;
}

/* Mantém todas as ações e contadores na mesma linha. */
.comments-section .comment-actions {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap;
  gap: 14px !important;
  margin-top: 10px;
}

.comments-section .comment-actions button,
.comments-section .comment-like-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 5px !important;
  width: auto !important;
  white-space: nowrap !important;
}

.comments-section .comment-like-btn span {
  display: inline !important;
  position: static !important;
  width: auto !important;
  margin: 0 !important;
  line-height: inherit !important;
}

/* Respostas já existentes: bloco interno bem formado e recuado. */
.comments-section .reply-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin-top: 16px;
}

.comments-section .reply-list:empty {
  display: none;
}

.comments-section .reply-list .reply-item {
  display: grid !important;
  grid-template-columns: 38px minmax(0, 1fr) !important;
  gap: 12px !important;
  width: calc(100% - 28px) !important;
  margin: 0 0 0 28px !important;
  padding: 16px 18px !important;
  border: 1px solid rgba(255, 255, 255, .08) !important;
  border-radius: 14px !important;
  background: rgba(255, 255, 255, .035) !important;
  box-sizing: border-box;
}

.comments-section .reply-item .comment-avatar {
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  display: grid;
  place-items: center;
}

.comments-section .reply-item .comment-body {
  min-width: 0;
  width: 100%;
}

.comments-section .reply-item .comment-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.comments-section .reply-item .comment-body > p {
  margin: 6px 0 0;
  overflow-wrap: anywhere;
}

.comments-section .reply-form {
  width: 100%;
  margin-top: 14px;
}

@media (max-width: 640px) {
  .comments-section .comment-login-box {
    margin: 18px 0 28px;
  }

  .comments-section .reply-list .reply-item {
    grid-template-columns: 34px minmax(0, 1fr) !important;
    width: calc(100% - 14px) !important;
    margin-left: 14px !important;
    padding: 14px !important;
  }

  .comments-section .reply-item .comment-avatar {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
  }
}
