.comment-box {
  margin-top: 1.5rem; /* separate from image */
  background-color: #fff; /* white card */
  padding: 1rem 1.25rem; /* room to breathe */
  border-radius: 8px; /* smooth corners */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.06);
}
.comment-box h3 {
  margin: 0 0 0.5rem; /* space below title */
  font-size: 1.2rem;
  color: var(--color-text);
}
.comment-form {
  display: block;
  flex-direction: column;
  gap: 0.75rem;
}
.comment-form-input,
.comment-form-textarea {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: #f5f5f5;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  margin: 0.5rem;
  resize: vertical;
}

.comments-panel-header {
  margin: 0 0 1rem;
  font-size: 1.2rem;
}

.comments-list {
  list-style: none;
  margin: 0;
  padding: 0;
  /* limit height so ~10 items show before scroll */
  max-height: 60vh; /* tweak as needed */
  overflow-y: auto; /* already there, but keep for clarity */
}

.comment-item {
  display: flex;
  margin-bottom: 0.75rem;
  justify-content: space-between;
  align-items: flex-start; /* align items to the top */
  background-color: #dddbdbc5;
  border-radius: 2%;
  padding: 0.5rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  transition: background-color 0.2s ease;
  /* hover effect */
  cursor: pointer;
  &:hover {
    background-color: #d0d0d0;
  }
  /* flex-grow: 1; */ /* optional, if you want items to fill available space */
  flex-basis: 100%; /* ensure each comment takes full width */

  grid-template-columns: 1fr auto auto;
}

.comment-item .comment-header {
  flex: 0 0 calc(2 / 12 * 100%);
  max-width: calc(2 / 12 * 100%);
  /* allow the date to wrap under the name */
  white-space: normal;
}

.comment-item .comment-text {
  flex: 0 0 calc(9 / 12 * 100%);
  max-width: calc(9 / 12 * 100%);
  overflow-wrap: break-word;
  white-space: normal;
  padding: 0 0.5rem;
}

.comment-item .comment-delete-btn {
  max-width: calc(1 / 12 * 100%);
  margin-left: auto;
}

.comment-author {
  display: block;
  font-weight: bold;
}
.comment-date {
  display: block;
  font-size: 0.75rem;
  color: #777;
  margin: 0 0 0.5rem;
}

.comment-text {
  margin-top: 0.25rem;
  line-height: 1.4;
  font-size: 0.95rem;
}

.comment-delete-btn {
  width: 2rem;
  height: 2rem;
  padding: 2px;
  border: none;
  border-radius: 50%;
  background-color: var(--color-danger);
  background-image: url("../media/recycle-bin.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 1.25rem; /* scale the PNG to fit nicely */

  /* cursor */
  cursor: pointer;
}

.comments-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: auto;
}
