/* === Emoji Categories Bar === */
 .emoji-textarea-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
  }

  .emoji-textarea-wrapper label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
  }

  #postarea {
    width: 100%;
    border: 1px ridge #cccccc;
    border-radius: 10px;
    padding: 10px 40px 10px 10px; /* right padding for emoji button */
    box-sizing: border-box;
    resize: vertical;
  }

  #emoji-toggle {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
  }

  #emoji-toggle:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
  }
#emoji-categories {
  margin-bottom: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px; /* Optional: cleaner spacing */
}

#emoji-categories button {
  font-size: 14px;
  padding: 5px 10px;
  cursor: pointer;
  background: #f3f3f3;
  border: 0px solid #ccc;
  border-radius: 5px;
  transition: background-color 0.2s ease;
}
#emoji-categories button:hover,
#emoji-categories button:focus {
  background-color: #e0e0e0;
  outline: none;
}

#emoji-categories button.active {
  background-color: #007bff;
  color: white;
  border-radius: 4px;
}

/* === Emoji Popup Box === */
#emoji-popup {
  display: none;
  position: absolute;
  bottom: 45px;
  right: 0;
  z-index: 10000;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  width: 400px;
  max-width: 95vw;
  overflow: hidden;
}

/* === Emoji and Recent Bars === */
#emoji-bar,
#recent-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 80px;
  overflow-x: auto;
  white-space: nowrap;
  border: 0px solid #ccc;
  padding: 8px;
  border-radius: 8px;
  font-size: 22px;
  scroll-behavior: smooth;
}
/* === Individual Emoji Styles === */
#emoji-bar span,
#recent-bar span {
  cursor: pointer;
  font-size: 22px;
  margin-right: 8px;
  transition: background-color 0.2s ease;
} 

#emoji-bar span:hover,
#recent-bar span:hover {
  background-color: #f0f0f0;
  border-radius: 4px;
}

/* === Emoji Auto-Suggestion Box === */
#emoji-suggestion {
  max-height: 150px;
  overflow-y: auto;
}

#emoji-suggestion div:hover,
#emoji-suggestion div.focused {
  background-color: #f0f0f0;
}

/* === Search Input Enhancements === */
#emoji-search:focus {
  outline: 0px solid #868686;
}

#emoji-search-clear {
  display: none; /* Hidden by default */
}

#emoji-search-clear.visible {
  display: block !important; /* Force visibility when needed */
}
#emoji-search-clear:hover {
  color: #333;
}