.userpost-section {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  width: 100%;
  max-width: 100%;
  overflow-x: visible;  /* Prevent horizontal scrolling */
  word-wrap: break-word;
  margin-bottom: 20px;
}

* {
  box-sizing: border-box;
}

.userpost-section img {
  max-width: 300px;
  /* Adjust image size */
  height: auto;
  margin-right: 15px;
  margin-bottom: 8px;
  border-radius: 8px;
  /* Optional: Rounded corners */
  flex-shrink: 0;
  /* Prevent the image from shrinking */
}

.userpost-section-text {
  flex: 1;
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
  box-sizing: border-box;
  /* Take up remaining space */
}

/* User Post Header */
.userpost-header {
  display: flex;
  margin-top: 1rem;
  align-items: flex-start;
  gap: 10px;
  position: relative;
}

.userpost-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  /* Optional: Circular avatar */
}

.userpost-info {
  display: flex;
  flex-direction: column;
  /* Stack name and date vertically */
}

.userpost-display-name {
  font-weight: bold;
  margin: 0;
}

.userpost-date {
  font-size: 0.9em;
  color: #6c757d;
  /* Match the muted text color */
}

.userpost-close {
  background: none;
  border: none;
  font-size: 1.2em;
  color: #dc3545;
  cursor: pointer;
  position: absolute;
  right: 10px;
  /* Slight margin from the right */
  top: 50%;
  transform: translateY(-50%);
}

.userpost-close:hover {
  color: #a71d2a;
}

/* Post Content */
.userpost-content {
  padding: 10px 0;
  /* padding-left: 68px; /* Increased padding for better alignment */
}

/* Community Engagement Row */
.userpost-engagement {
  padding: 10px 0;
  border-top: 1px solid #ccc;
  /* Adjust the color to match your design */
  border-bottom: 1px solid #ccc;
  /* Adjust the color to match your design */
  margin-top: 1rem;
  /* Adds spacing above the border, if needed */
  padding-top: 0.5rem;
  /* Adds spacing below the border, if needed */
  /* padding-left: 68px; /* Increased padding for better alignment */
}

/* Interaction Controls Row */
.userpost-interactions {
  padding: 10px 0;
  padding-left: 68px;
  /* Increased padding for better alignment */
}

/* ******************************* */
.reaction-heatmap {
  display: flex;
  justify-content: center;
  align-items: center;
  /* gap: .15rem; /* Reduced gap for smoother hover transitions */
  margin: 0 auto;
  margin-top: 20px;
  width: 100%;
}

.reaction {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  line-height: 1;
  font-size: 1.4em;
  transition: font-size 0.2s ease, background-color 0.2s ease;
  /* padding: 0 rem; /* Extend hover area between icons */
  cursor: pointer;
  /* Show link-clicking finger on hover */
  width: 2.4em;
  /* Fixed width to prevent layout shift */
  height: 2.4em;
  /* Fixed height to prevent layout shift */
  box-sizing: content-box;
  position: relative
}

.reaction:hover {
  transform: scale(1.6);
  /* Enlarge on hover using scaling */
  /* background-color: rgba(0, 0, 0, 0.05); /* Optional hover background */
}

.reaction[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  /* Use the value from data-tooltip */
  position: absolute;
  bottom: 100%;
  /* Position above the emoticon */
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.8);
  /* Dark background for the tooltip */
  color: #fff;
  /* White text color */
  padding: 5px 8px;
  /* Add some padding */
  border-radius: 4px;
  /* Rounded corners */
  font-size: 0.8em;
  /* Smaller font size */
  white-space: nowrap;
  /* Prevent text from wrapping */
  pointer-events: none;
  /* Prevent the tooltip from interfering with hover */
  z-index: 10;
  /* Ensure it appears above other content */
  opacity: 0;
  /* Start invisible */
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.reaction[data-tooltip]:hover::before {
  content: '';
  position: absolute;
  bottom: 100%;
  /* Position above the emoticon */
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  /* Small offset for the triangle */
  border-width: 6px;
  /* Triangle size */
  border-style: solid;
  border-color: rgba(0, 0, 0, 0.8) transparent transparent transparent;
  opacity: 0;
  /* Start invisible */
  transition: opacity 0.2s ease;
}

.reaction[data-tooltip]:hover::after,
.reaction[data-tooltip]:hover::before {
  opacity: 1;
  /* Show tooltip on hover */
}

.reaction.selected {
  transform: scale(1.7);
}

.reaction.selected .reaction-count {
  font-size: 0.8em;
}

.reaction-count {
  margin-top: 2px;
  color: #555;
  font-size: 0.8em;
}

.comment-thread {
  margin: 0;
  padding: 0;
}

.comment {
  margin-bottom: 1rem;
  padding: 0.5rem;
  border-left: 2px solid #ddd;
  background-color :whitesmoke;
}

.child-comments {
  margin-left: 2rem; /* Indent nested comments */
  padding-left: 1rem;
  border-left: 1px dashed #ccc;
}
