/* comments.css — styling for the comment widget */

.comments-section {
  max-width: 600px;
  margin: 2rem auto;
  font-family: system-ui, -apple-system, sans-serif;
}

.comments-section h3 {
  margin-bottom: 1rem;
}

#comment-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

#comment-form input[type="text"],
#comment-form textarea {
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.95rem;
}

#comment-form textarea {
  min-height: 80px;
  resize: vertical;
}

#comment-form button {
  padding: 0.5rem;
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.95rem;
  align-self: flex-start;
}

#comment-form button:hover {
  background: #1d4ed8;
}

/* Honeypot field — hidden from sighted users and screen readers,
   but still present in the DOM for bots that blindly fill every input. */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.auth-error {
  color: #dc2626;
  font-size: 0.85rem;
  min-height: 1.2em;
  margin: 0;
}

.comment {
  padding: 0.75rem 0;
  border-bottom: 1px solid #eee;
}

.comment-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #555;
  margin-bottom: 0.3rem;
}

.comment-date {
  color: #888;
}

.comment-text {
  white-space: pre-wrap;
  line-height: 1.4;
}

.no-comments {
  color: #888;
  font-style: italic;
}

/* comments.css — add these new lines to your existing comments.css */

/* Awaiting moderation message (shown after posting) */
.form-message {
  font-size: 0.88rem;
  min-height: 1.2em;
  margin: 0;
}

.msg-pending {
  color: #854d0e;
  background: #fef9c3;
  border: 1px solid #fde047;
  border-radius: 4px;
  padding: 0.5rem 0.75rem;
}

.msg-error {
  color: #dc2626;
}

/* Add these styles to your existing comments.css */

/* Replies container — sits below the comment it belongs to */
.comment-replies {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #f0f0f0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

/* Individual admin reply bubble */
.admin-reply {
  background: #eff6ff;
  border-left: 3px solid #2563eb;
  border-radius: 0 6px 6px 0;
  padding: 0.6rem 0.85rem;
  margin-left: 1rem;
}

.reply-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  margin-bottom: 0.3rem;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.reply-author {
  font-weight: 700;
  color: #1d4ed8;
}

.reply-date {
  color: #888;
}

.reply-text {
  white-space: pre-wrap;
  line-height: 1.4;
  font-size: 0.92rem;
  color: #1e3a6e;
}

/* Pending message shown after comment submission */
.form-message {
  font-size: 0.88rem;
  min-height: 1.2em;
  margin: 0;
}

.msg-pending {
  color: #854d0e;
  background: #fef9c3;
  border: 1px solid #fde047;
  border-radius: 4px;
  padding: 0.5rem 0.75rem;
}

.msg-error {
  color: #dc2626;
}