/* ===== VIEWS STYLES ===== */
/**
 * @file: community/comments.css
 * @description: 게시글 상세보기 모달 안의 댓글 섹션 스타일
 * @components: 게시글 상세보기 모달 안의 댓글 섹션
 * @usage: 게시글 상세보기 모달 안의 댓글 섹션 스타일링
 */
.comments-section {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.comments-section h3 {
  font-size: 1.2em;
  color: #333;
  margin-bottom: 20px;
}

.comment-form {
  margin-bottom: 24px;
  background-color: #ffffff;
  padding: 16px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.comment-form textarea {
  width: 100%;
  height: 80px;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  resize: vertical;
  margin-bottom: 8px;
  box-sizing: border-box;
}

.comment-form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#commentCount {
  color: #666;
  font-size: 0.9em;
}

#submitComment {
  background-color: #1a73e8;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9em;
}

#submitComment:hover {
  background-color: #1557b0;
}

.comment {
  padding: 16px;
  border-bottom: 1px solid #f0f0f0;
  transition: all 0.2s ease;
  background-color: #ffffff;
  border-radius: 12px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.comment:hover {
  background-color: #f8fafe;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(26, 115, 232, 0.08);
}

.comment:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.comment-author {
  font-weight: 600;
  color: #1a73e8;
  font-size: 0.95em;
}

.comment-date {
  color: #666;
  font-size: 0.85em;
}

.comment-actions {
  margin-left: auto;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.comment:hover .comment-actions {
  opacity: 1;
}

.comment-actions button {
  background: none;
  border: none;
  padding: 4px 8px;
  font-size: 0.85em;
  color: #666;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.comment-actions button:hover {
  background-color: #f0f0f0;
}

.comment-actions button.edit-comment {
  color: #1a73e8;
}

.comment-actions button.edit-comment:hover {
  background-color: #e8f0fe;
}

.comment-actions button.delete-comment {
  color: #dc3545;
}

.comment-actions button.delete-comment:hover {
  background-color: #fff5f5;
}

.comment-author-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.comment-profile-image {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #e0e0e0;
}

/* 댓글 내용 스타일 */
.comment-content {
  color: #333;
  line-height: 1.6;
  font-size: 0.95em;
  padding: 4px 0;
}

/* 댓 수정 폼 스타일 */
.edit-comment-form {
  margin-top: 8px;
}

.edit-comment-textarea {
  width: 100%;
  height: 60px;
  padding: 12px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  resize: vertical;
  margin-bottom: 8px;
  font-size: 0.95em;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}

.edit-comment-textarea:focus {
  border-color: #1a73e8;
  outline: none;
}

.edit-comment-footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.edit-comment-footer button {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.9em;
  font-weight: 500;
  transition: all 0.2s ease;
}

.save-comment {
  background-color: #1a73e8;
  color: white;
  border: none;
}

.save-comment:hover {
  background-color: #1557b0;
  transform: translateY(-1px);
}

.cancel-comment {
  background-color: #f1f3f4;
  color: #5f6368;
  border: 2px solid #e0e0e0;
}

.cancel-comment:hover {
  background-color: #e8eaed;
}

/* 삭제된 댓글 스타일 */
.comment-deleted {
  color: #888;
  font-style: italic;
  padding: 10px;
  background-color: #f5f5f5;
  border-radius: 4px;
  margin: 5px 0;
}

/* 대댓글 스타일 */
.replies-container {
  margin-left: 2.5rem;
  padding-left: 1.25rem;
  border-left: 2px solid #e8eef9;
}

.reply {
  margin: 0.75rem 0;
  padding: 1rem;
  background-color: #f8fafe;
  border-radius: 10px;
  border: 1px solid #edf2fc;
  box-shadow: 0 2px 6px rgba(26, 115, 232, 0.06);
}

.reply:hover {
  background-color: #f0f7ff;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(26, 115, 232, 0.08);
}

/* 답글 버튼 스타일 */
.reply-button {
  margin-top: 0.75rem;
  padding: 0.5rem 1rem;
  background-color: #f0f7ff;
  border: 1px solid #e1ebfa;
  border-radius: 20px;
  color: #1a73e8;
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.reply-button:hover {
  background-color: #e4efff;
  color: #1557b0;
  transform: translateY(-1px);
}

/* 답글 작성 폼 스타일 */
.reply-form {
  margin: 1rem 0;
  padding: 1.25rem;
  background-color: #ffffff;
  border-radius: 12px;
  border: 1px solid #edf2fc;
  box-shadow: 0 2px 8px rgba(26, 115, 232, 0.06);
}

.reply-textarea {
  width: 100%;
  min-height: 60px;
  padding: 0.875rem;
  margin-bottom: 1rem;
  border: 1px solid #e1ebfa;
  border-radius: 8px;
  resize: vertical;
  font-size: 0.9rem;
  transition: border-color 0.2s ease;
}

.reply-textarea:focus {
  border-color: #1a73e8;
  outline: none;
}
