/* ===============================
   Container Geral
=============================== */
#gs-comment-container {
  border-radius: 5px;
  padding: 20px;
  margin-top: 30px;
  color: #eee;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* ===============================
   Cabeçalho: Título e Meta
=============================== */
#gs-comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#gs-comment-title {
  font-size: 22px;
  font-weight: bold;
  color: #fff;
}

#gs-comment-meta {
  display: flex;
  align-items: center;
}

#gs-comment-count {
  font-size: 16px;
  color: #bbb;
  margin-right: 15px;
}

/* ===============================
   Linha Divisória
=============================== */
.gs-divider {
  border: none;
  border-top: 1px solid #555;
  margin: 15px 0;
}

/* ===============================
   Caixa "Iniciar Comentário" + Filtros alinhados
=============================== */
#gs-comment-form {
  display: block;
  position: relative;
}

#gs-start-comment-input {
  width: 100%;
  min-width: 100%;
  max-width: 100%;
  flex: 1;
  background: #2c2c2c;
  border: 1px solid #444;
  color: #fff;
  padding: 10px;
  border-radius: 6px;
  font-size: 14px;
  resize: vertical;
  overflow-y: hidden;
  min-height: 80px;
  max-height: 300px;
  margin-right: 0;
}

/* Filtros de Comentários (Ordenação) estilo YouTube canal */
#gs-comment-filters {
  display: flex;
  gap: 0;
  margin: 0 0 10px 0;
  font-family: "Montserrat", Arial, sans-serif;
  justify-content: flex-end;
  align-items: center;
  width: 100%;
  position: static;
  top: 0;
  background: transparent;
}

.gs-filter-btn {
  background: none;
  border: none;
  color: #bbb;
  font-size: 15px;
  font-family: "Montserrat", Arial, sans-serif;
  padding: 10px 22px 8px 22px;
  cursor: pointer;
  position: relative;
  outline: none;
  transition: color 0.18s, background 0.18s;
  border-radius: 20px 20px 0 0;
  margin: 0 2px;
  font-weight: 500;
  letter-spacing: 0.2px;
}

.gs-filter-btn.active,
.gs-filter-btn:hover {
  color: #fff;
}

.gs-filter-btn.active::after {
  content: "";
  display: block;
  height: 3px;
  background: #0073aa;
  border-radius: 2px 2px 0 0;
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 0;
  transition: background 0.18s;
}

.gs-filter-btn:not(.active):hover::after {
  content: "";
  display: block;
  height: 3px;
  background: #444;
  border-radius: 2px 2px 0 0;
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 0;
  opacity: 0.7;
}

@media (max-width: 600px) {
  #gs-comment-container {
    padding: 8px;
    max-width: 100vw;
  }
  .gs-comment-card {
    padding: 10px;
    margin-bottom: 10px;
  }
  .gs-comment-header {
    flex-direction: row;
    gap: 6px;
    font-size: 13px;
  }
  .gs-comment-avatar {
    width: 32px;
    height: 32px;
    margin-right: 8px;
  }
  .gs-comment-author {
    font-size: 13px;
  }
  .gs-comment-date {
    font-size: 11px;
  }
  .gs-comment-actions {
    gap: 4px;
    flex-wrap: wrap;
  }
  .gs-button,
  .gs-button-primary,
  .gs-button-vote,
  .gs-button-reply {
    font-size: 12px;
    padding: 7px 8px;
    border-radius: 4px;
  }
  .gs-button-delete {
    font-size: 9px;
    padding: 4px 7px;
    top: 6px;
    right: 6px;
  }
  .gs-button-edit {
    font-size: 11px;
    margin-left: 4px;
    padding: 0 3px;
  }
  .gs-reply-list {
    margin-left: 16px;
    padding-left: 8px;
  }
  .gs-reply-input {
    min-height: 60px;
    max-height: 180px;
    padding: 10px;
    font-size: 13px;
    margin: 10px 0;
  }
  #gs-start-comment-input {
    min-height: 60px;
    max-height: 180px;
    font-size: 13px;
    padding: 8px;
  }
  #gs-comment-filters {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin: 8px 0 8px 0;
  }
  .gs-filter-btn {
    padding: 7px 0 5px 0;
    font-size: 13px;
    margin: 0 1px;
  }
}

/* ===============================
   Cartões de Comentário
=============================== */
.gs-comment-card {
  background: #3b3b3b;
  border: 1px solid #555;
  padding: 15px;
  margin-bottom: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.gs-comment-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

/* Novo: imagem de perfil redonda */
.gs-comment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 12px;
  border: 2px solid #fff;
  background: #222;
  flex-shrink: 0;
}

/* Header do comentário: avatar + nick lado a lado */
.gs-comment-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 14px;
  color: #bbb;
  /* justify-content removido para alinhar à esquerda */
}

/* Bloco nick + data ao lado do avatar */
.gs-comment-meta-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.gs-comment-author {
  font-weight: bold;
  color: #fff;
  font-size: 15px;
  line-height: 1.1;
  margin-bottom: 2px;
}

.gs-comment-date {
  font-size: 12px;
  color: #888;
  font-weight: normal;
  margin: 0;
  line-height: 1.1;
  margin-bottom: 0;
  margin-top: 0;
}

/* ===============================
   Ações de Comentário
=============================== */
.gs-comment-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  justify-content: flex-start;
}

/* Botões: sem preenchimento, apenas borda branca */
.gs-button,
.gs-button-primary,
.gs-button-vote,
.gs-button-reply {
  background: transparent !important;
  color: #fff;
  border: 1.5px solid #fff;
  box-shadow: none;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.gs-button:hover,
.gs-button:focus,
.gs-button-primary:hover,
.gs-button-primary:focus,
.gs-button-vote:hover,
.gs-button-vote:focus,
.gs-button-reply:hover,
.gs-button-reply:focus {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #fff;
  border-color: #3a3a3a;
}

.gs-button-primary {
  font-weight: bold;
}

/* Botão de lixeira no canto superior direito */
.gs-button-delete {
  background: transparent !important;
  color: #c5c5c5;
  border: 1px solid #c5c5c5;
  font-size: 10px;
  padding: 5px 10px;
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  border-radius: 5px;
}

.gs-button-delete:hover {
  background: #535353 !important;
  color: #fff;
  border-color: #fff;
  border-radius: 5px;
}

/* Botão de like/dislike: só borda branca, sem preenchimento */
.gs-button-vote.gs-like,
.gs-button-vote.gs-dislike {
  background: transparent !important;
  color: #fff;
  border: 1px solid #fff;
  padding: 5px 7px;
  border-radius: 5px;
}

.gs-button-vote.gs-like.liked,
.gs-button-vote.gs-dislike.disliked {
  border-color: #0073aa;
  color: #0073aa;
  background: transparent !important;
}

.gs-button-vote.gs-like:not(.liked),
.gs-button-vote.gs-dislike:not(.disliked) {
  border-color: #fff;
  color: #fff;
  background: transparent !important;
}

/* ===============================
   Resposta (thread)
=============================== */
.gs-reply-list {
  margin-left: 40px;
  margin-top: 10px;
  border-left: 2px solid #444;
  padding-left: 15px;
}

/* Caixa de resposta: mesma altura da caixa de novo comentário */
.gs-reply-input {
  min-height: 80px;
  max-height: 300px;
  /* reduzir margem para evitar deslocamento excessivo quando houver respostas */
  margin: 8px 0;
  /* opcional: para ocupar toda a largura do container de resposta */
  width: 100%;
  resize: vertical;
  background: #2c2c2c00;
  border: 1px solid #444;
  color: #fff;
  padding: 20px;
  border-radius: 6px;
  font-size: 14px;
  overflow-y: hidden;
  box-sizing: border-box;
}

/* Se houver replies aninhadas (respostas de respostas), neutralize o recuo adicional
   para que todas as respostas exibam o mesmo nível de indentação visual. */
.gs-reply-list .gs-reply-list {
  margin-left: 0;
  padding-left: 0;
  border-left: none;
  margin-top: 10px;
}

.gs-button-reply {
  padding: 10px;
  border-radius: 5px;
  border: 1px solid #fff;
  background: transparent !important;
  color: #fff;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  /* Remove qualquer cor de borda verde */
}

/* Botão editar ao lado do responder */
.gs-button-edit {
  background: none !important;
  border: none !important;
  color: #e74c3c;
  font-size: 12px;
  margin-left: 8px;
  padding: 0 6px;
  cursor: pointer;
  font-family: inherit;
  vertical-align: middle;
  transition: color 0.2s;
}

.gs-button-edit:hover,
.gs-button-edit:focus {
  color: #ff3b3b;
  text-decoration: underline;
}
