/* Estilos para reacciones estilo Facebook */

/* Contenedor de reacciones */
.reaction-container {
  position: relative;
  display: inline-block;
  /* Add a small padding to make the hover area slightly larger */
  padding: 2px 0;
  margin: -2px 0;
}

/* Menú de reacciones oculto por defecto */
.reaction-menu {
  position: absolute;
  bottom: 40px;
  left: 0;
  background-color: white;
  border-radius: 30px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  padding: 8px 10px;
  display: none;
  z-index: 1000;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(10px);
  align-items: center;
  pointer-events: auto; /* Ensure the menu can receive mouse events */
}

/* Menú de reacciones para comentarios (estilo específico) */
.comment-reaction-menu {
  transform: translateY(-100%);
  margin-bottom: 10px;
}

/* Opciones de reacción */
.reaction-option {
  background: none;
  border: none;
  font-size: 20px;
  padding: 5px;
  margin: 0 3px;
  cursor: pointer;
  transition: transform 0.2s ease;
  width: 42px;
  height: 42px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  position: relative;
  z-index: 1001; /* Ensure options are clickable */
}

/* Emoji dentro de las opciones de reacción */
.reaction-emoji {
  font-size: 24px;
  line-height: 1;
}

/* Etiqueta del tipo de reacción */
.reaction-label {
  position: absolute;
  bottom: -18px;
  font-size: 10px;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 2px 5px;
  border-radius: 3px;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(5px);
  transition: all 0.2s ease;
  pointer-events: none;
}

/* Efectos al pasar el mouse por las opciones */
.reaction-option:hover {
  transform: scale(1.3) translateY(-5px);
}

/* Colores específicos para cada tipo de reacción */
.reaction-option[data-reaction="like"]:hover i {
  color: #2078f4;
}

.reaction-option[data-reaction="love"]:hover i {
  color: #f33e58;
}

.reaction-option[data-reaction="laugh"]:hover i {
  color: #f7b125;
}

.reaction-option[data-reaction="wow"]:hover i {
  color: #f7b125;
}

.reaction-option[data-reaction="sad"]:hover i {
  color: #f7b125;
}

.reaction-option[data-reaction="angry"]:hover i {
  color: #e4605a;
}

/* Estilos para reacciones activas */
.post-action-btn.like-btn.reacted-like i {
  color: #2078f4;
}

.post-action-btn.like-btn.reacted-love i {
  color: #f33e58;
}

.post-action-btn.like-btn.reacted-laugh i {
  color: #f7b125;
}

.post-action-btn.like-btn.reacted-wow i {
  color: #f7b125;
}

.post-action-btn.like-btn.reacted-sad i {
  color: #f7b125;
}

.post-action-btn.like-btn.reacted-angry i {
  color: #e4605a;
}

/* Resumen de reacciones */
.reactions-summary {
  padding: 5px 15px;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
}

.reactions-display {
  display: flex;
  align-items: center;
  gap: 5px;
}

.reaction-icons {
  display: flex;
}

.reaction-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: -5px;
  box-shadow: 0 0 0 2px white;
}

.reaction-icon:first-child {
  margin-left: 0;
}

.reaction-icon.like-icon {
  background-color: #2078f4;
  color: white;
}

.reaction-icon.love-icon {
  background-color: #f33e58;
  color: white;
}

.reaction-icon.laugh-icon {
  background-color: #f7b125;
  color: white;
}

.reaction-icon.wow-icon {
  background-color: #f7b125;
  color: white;
}

.reaction-icon.sad-icon {
  background-color: #f7b125;
  color: white;
}

.reaction-icon.angry-icon {
  background-color: #e4605a;
  color: white;
}

.reactions-count {
  color: var(--text-secondary);
  font-size: 13px;
}

.action-text {
  margin-left: 5px;
}

/* Ajustes para los botones de acción */
.post-actions-bar {
  display: flex;
  justify-content: space-around;
  padding: 8px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  margin: 10px 0;
}

.post-action-btn {
  background: none;
  border: none;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 5px;
  color: var(--text-secondary);
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
}

.post-action-btn:hover {
  background-color: var(--hover-bg);
}
