/* Comments section wrapper */
#comments.container {
  max-width: 600px;
  font-size: 0.95rem;
  margin: 2rem auto;
  padding: 1rem;
  border: 1px solid #eee;
  border-radius: 10px;
}

/* Section heading */
.comments-title {
  margin: 0 0 1rem 0;
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  line-height: 1.15;
  font-weight: 800;
  color: #0b5fff;
}
.comments-title::after {
  content: "";
  display: block;
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, #0b5fff, #6ea0ff);
  border-radius: 2px;
  margin-top: .3rem;
}

/* Comments list (scrollable if too tall) */
#comment-list {
  display: grid;
  gap: 10px;
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 1rem;
}

/* Each comment card */
.comment-card {
  border: 1px solid #e3e3e3;
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  background: #fff;
  font-size: 0.9rem;
  transition: background 0.2s ease;
}
.comment-card:hover {
  background: #f9faff; /* faint highlight on hover */
}

/* Name stronger */
.comment-card .name {
  font-weight: 700;
  color: #0b5fff;
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}

/* Timestamp subtle */
.comment-card .date {
  font-size: 0.8rem;
  color: #666;
  margin-bottom: 0.4rem;
  display: block;
}

/* Comment body clearer */
.comment-card p,
.comment-card .body {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.4;
  color: #222;
}

/* Form styling */
#comment-form {
  margin-top: 1rem;
  padding: 0.75rem;
  border: 1px solid #eee;
  border-radius: 8px;
  background: #fff;
  font-size: 0.9rem;
}

/* Labels */
#comment-form .label {
  font-weight: 600;
  color: #222;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
  display: block;
}
#comment-form .muted {
  color: #666;
  font-weight: 400;
}

/* Inputs and textarea */
#comment-form input,
#comment-form textarea {
  width: 100%;
  font-size: 0.9rem;
  padding: 0.4rem 0.6rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  margin-bottom: 0.75rem;
}
#comment-form textarea {
  resize: vertical;
  min-height: 70px;
  max-height: 160px;
}

/* Form layout row */
#comment-form .row {
  gap: 1rem;
  flex-wrap: wrap;
}
#comment-form .row .field {
  flex: 1 1 240px;
}

/* Post comment button */
#comment-form .btn.btn-blue {
  font-size: 0.9rem;
  padding: 0.4rem 1rem;
  border-radius: 6px;
  background: #0b5fff;
  color: #fff;
  font-weight: 600;
  transition: background 0.2s ease;
}
#comment-form .btn.btn-blue:hover {
  background: #094acc;
}

/* Status text */
#comment-form .status {
  font-size: 0.8rem;
  color: #666;
  margin-left: 0.75rem;
  vertical-align: middle;
}

/* Mobile adjustments */
@media (max-width: 480px) {
  #comments.container {
    padding: 0.75rem;
    font-size: 0.9rem;
  }
  #comment-form .row {
    flex-direction: column;
    gap: 0.5rem;
  }
  #comment-list {
    max-height: 240px;
  }
}