/* =========================================================
   VinSnap — CommentThread Component Styles
   Dark-themed comment section displayed below posts
   ========================================================= */

.comment-thread {
  padding: 0 1rem 1rem;
  border-top: 1px solid var(--border-color);
}

/* --- Header row --- */
.comment-thread-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
}

.comment-thread-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* --- Comment list --- */
.comment-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* --- Individual comment --- */
.comment-item {
  display: flex;
  gap: 0.5rem;
}

.comment-item.is-reply {
  margin-left: 2.5rem;
  padding-left: 0.75rem;
  border-left: 2px solid var(--border-color);
}

/* --- Avatar --- */
.comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: white;
  background: linear-gradient(135deg, #3b82f6, #22D3A6);
}

.comment-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* --- Comment body --- */
.comment-body {
  flex: 1;
  min-width: 0;
}

.comment-author {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
}

.comment-text {
  font-size: 0.85rem;
  color: var(--text-primary);
  line-height: 1.4;
  margin-top: 2px;
  word-break: break-word;
}

/* --- Meta row (time, reply, delete) --- */
.comment-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 4px;
}

.comment-time {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.comment-reply-btn {
  font-size: 0.7rem;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-weight: 600;
}

.comment-reply-btn:hover {
  color: var(--accent);
}

.comment-delete-btn {
  font-size: 0.7rem;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.comment-delete-btn:hover {
  color: #ef4444;
}

/* --- Replying-to indicator --- */
.comment-replying-to {
  font-size: 0.75rem;
  color: var(--accent);
  padding: 4px 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.comment-replying-to button {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.8rem;
}

/* --- Input row --- */
.comment-input-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  align-items: flex-end;
}

.comment-input {
  flex: 1;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 0.5rem 1rem;
  color: var(--text-primary);
  font-size: 0.85rem;
  outline: none;
  resize: none;
  min-height: 36px;
  max-height: 100px;
  font-family: inherit;
}

.comment-input:focus {
  border-color: var(--accent);
}

.comment-input::placeholder {
  color: var(--text-secondary);
}

/* --- Send button --- */
.comment-send-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
  transition: transform 0.15s;
}

.comment-send-btn:hover {
  transform: scale(1.05);
}

.comment-send-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* --- Load more button --- */
.comment-load-more {
  display: block;
  margin: 0.75rem auto 0;
  background: none;
  border: none;
  color: var(--accent);
  font-size: 0.8rem;
  cursor: pointer;
  font-weight: 600;
}

.comment-load-more:hover {
  text-decoration: underline;
}
