/* Comments Section */
.comments-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #e5e7eb;
}

.comments-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.comments-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.comments-title i {
  color: #6366f1;
}

/* Comment Form */
.comment-form-container {
  margin-bottom: 2rem;
}

.comment-form {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1.5rem;
}

.comment-form-header {
  margin-bottom: 1.5rem;
}

.comment-form-header h4 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 0.5rem 0;
}

.comment-form-header p {
  color: #6b7280;
  margin: 0;
  font-size: 0.875rem;
}

.comment-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.comment-form-input {
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.comment-form-input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.comment-form-textarea {
  width: 100%;
  min-height: 120px;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-family: inherit;
  resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
  margin-bottom: 1rem;
}

.comment-form-textarea:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.comment-form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.comment-form-info {
  flex: 1;
}

.comment-submit-btn {
  background: #6366f1;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.comment-submit-btn:hover {
  background: #4f46e5;
}

.comment-submit-btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

/* Comments List */
.comments-list {
  space-y: 1.5rem;
}

.comment-item {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.comment-item.new {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
  animation: highlight 2s ease-out;
}

@keyframes highlight {
  0% {
    background-color: rgba(99, 102, 241, 0.05);
  }
  100% {
    background-color: white;
  }
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.comment-author-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.comment-avatar {
  width: 2.5rem;
  height: 2.5rem;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 0.875rem;
}

.comment-author-details h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
}

.comment-date {
  font-size: 0.75rem;
  color: #6b7280;
  margin: 0.25rem 0 0 0;
}

.comment-actions {
  display: flex;
  gap: 0.5rem;
}

.comment-reply-btn {
  background: none;
  border: 1px solid #d1d5db;
  color: #6b7280;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.comment-reply-btn:hover {
  background: #f3f4f6;
  color: #374151;
}

.comment-content {
  color: #374151;
  line-height: 1.6;
  margin-bottom: 1rem;
}

/* Replies */
.comment-replies {
  margin-top: 1rem;
  padding-left: 1rem;
  border-left: 2px solid #e5e7eb;
}

.reply-item {
  background: #f9fafb;
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 0.75rem;
}

.reply-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.reply-author-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.reply-avatar {
  width: 1.75rem;
  height: 1.75rem;
  background: linear-gradient(135deg, #10b981, #059669);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 0.75rem;
}

.reply-author {
  font-size: 0.75rem;
  font-weight: 600;
  color: #1f2937;
}

.reply-date {
  font-size: 0.625rem;
  color: #6b7280;
}

.reply-content {
  color: #374151;
  font-size: 0.875rem;
  line-height: 1.5;
}

/* Reply Form */
.reply-form {
  margin-top: 1rem;
  padding: 1rem;
  background: #f9fafb;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
  display: none;
}

.reply-form.active {
  display: block;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reply-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.reply-form-textarea {
  width: 100%;
  min-height: 80px;
  padding: 0.5rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-family: inherit;
  resize: vertical;
  margin-bottom: 0.75rem;
}

.reply-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.reply-cancel-btn {
  background: none;
  border: 1px solid #d1d5db;
  color: #6b7280;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  cursor: pointer;
}

.reply-submit-btn {
  background: #6366f1;
  color: white;
  border: none;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Load More Button */
.load-more-container {
  text-align: center;
  margin-top: 2rem;
}

.load-more-btn {
  background: white;
  border: 1px solid #d1d5db;
  color: #6b7280;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.load-more-btn:hover {
  background: #f9fafb;
  color: #374151;
}

/* Show More Button */
.show-more-btn {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  border: none;
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.show-more-btn:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.show-more-btn:active {
  transform: translateY(0);
}

/* Messages */
.comment-message {
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.comment-message.success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.comment-message.error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

/* Loading States */
.comment-loading {
  text-align: center;
  padding: 2rem;
  color: #6b7280;
}

.spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid #e5e7eb;
  border-top: 2px solid #6366f1;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 0.5rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* No Comments State */
.no-comments {
  text-align: center;
  padding: 3rem 1rem;
  color: #6b7280;
}

.no-comments-icon {
  font-size: 3rem;
  color: #d1d5db;
  margin-bottom: 1rem;
}

.no-comments h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.5rem;
}

.no-comments p {
  font-size: 0.875rem;
  margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .comment-form-grid,
  .reply-form-grid {
    grid-template-columns: 1fr;
  }
  
  .comment-header,
  .reply-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .comment-actions {
    align-self: flex-end;
  }
  
  .comment-form-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .comment-replies {
    padding-left: 0.5rem;
  }
}

@media (max-width: 480px) {
  .comments-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
  }
  
  .comment-form,
  .comment-item {
    padding: 1rem;
  }
  
  .comments-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}
