/* CSS styles for comments */

/* for the div on the right that will hold comment objects (h3, form, comment-list div) */
.comment-container {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1rem;
}

.comment-header-row {
  align-items: center;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

/* "Comments" title heading */
.comment-header-row h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.2px;
  color: #111827;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid #f0f2f5;
}

/* Three buttons (show / hide, page-left, and page-right button) general styling */
.comment-arrow-button {
  width: 24px;
  height: 24px;
  border: none;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    transform 0.1s ease,
    box-shadow 0.15s ease;
  background-size: 16px 16px;
  background-repeat: no-repeat;
  background-position: center;
  background-color: transparent;
}

/* Button to show / hide more comments in header row (beside "Comments" title) */
.comment-toggle {
  background-image: url("../../assets/arrow-down.png");
}

.expanded .comment-toggle {
  background-image: url("../../assets/arrow-up.png");
}

/* comment form */
.comment-form {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

/* input within the comment forms */
.comment-form input {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  font-size: 0.9rem;
  outline: none;
}

.comment-form input:focus {
  border-color: #9ca3af;
  background-color: #bfeeff;
}

/* button within comment form */
.comment-form button {
  align-self: flex-end;
  border: 1px solid #d1d5db;
  background: white;
  padding: 0.45 rem 0.8rem;
  border-radius: 8px;
  cursor: pointer;
}

/* div where all comments will be appended */
.comment-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

/* for each comment within comment-list */
.comment {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
  background: white;
}

/* for the header of a comment (contains name and date of commentor)*/
.comment-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #6b7280;
  margin-bottom: 0.35rem;
}

/* name of commentor */
.comment-author {
  font-weight: 600;
}

/* content of comment */
.comment-content {
  margin: 0 0 0.45rem 0;
  color: #1f2937;
}

/* delete button within comment */
.comment-delete {
  border: none;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  font-size: 0.8rem;
  padding: 0;
}

/* div that holds previous- and next-page buttons */
.comment-pager {
  display: none;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.expanded .comment-pager {
  display: flex;
}

/* previous and next buttons */
.comment-page-prev,
.comment-page-next {
  border: 1px solid #d1d5db;
  border-radius: 8px;
}

.comment-page-prev {
  background-image: url("../../assets/arrow-left.png");
}

.comment-page-next {
  background-image: url("../../assets/arrow-right.png");
}
