/* Comment-specific styles */
.comment-content {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.comment-content p {
  margin-bottom: 0.75rem;
}

.comment-content p:last-child {
  margin-bottom: 0;
}

.comment-content strong {
  font-weight: 600;
  color: #1f2937;
}

.comment-content em {
  font-style: italic;
  color: #4b5563;
}

.comment-content .inline-code {
  background-color: #f3f4f6;
  color: #dc2626;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-family: ui-monospace, "SF Mono", "Monaco", "Inconsolata", "Roboto Mono", monospace;
  font-size: 0.875em;
}

.comment-content .comment-link {
  color: #1d4ed8;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.comment-content .comment-link:hover {
  color: #60a5fa;
}

.comment-content del {
  color: #6b7280;
  text-decoration: line-through;
}

.comment-item {
  animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Form validation styles */
.field-error {
  animation: shake 0.3s ease-in-out;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

/* Loading states */
.comment-loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Message styles */
.comment-message {
  animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Markdown preview styles */
#markdown-preview {
  min-height: 100px;
  max-height: 200px;
  overflow-y: auto;
}

#markdown-preview.hidden {
  display: none;
}

#markdown-preview.visible {
  display: block;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .comment-item {
    padding: 1rem;
  }

  .comment-item .flex {
    space-x: 0.75rem;
  }

  .comment-content {
    font-size: 0.875rem;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .comment-content .inline-code {
    background-color: #374151;
    color: #f87171;
  }

  .comment-content .comment-link {
    color: #60a5fa;
  }

  .comment-content .comment-link:hover {
    color: #93c5fd;
  }

  .comment-item {
    background-color: #1f2937;
    border-color: #374151;
  }

  .comment-item:hover {
    border-color: #4b5563;
  }
}
