/* ============================================================================
   ESTILOS PARA ESTADOS DE INTERACCIÓN v2.0
   ME GUSTA Y FAVORITO con temas consistentes
   ============================================================================ */

/* ==========================================
   BOTONES DE INTERACCIÓN BASE
   ========================================== */
.modal-interactions {
  display: flex;
  gap: 1rem;
  padding: 2rem 0;
  border-top: 2px solid var(--border-color);
  border-bottom: 2px solid var(--border-color);
  margin: 2rem 0;
}

.interaction-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  color: var(--text-secondary);
}

.interaction-btn i {
  font-size: 1.5rem;
  transition: transform 0.3s ease;
}

.interaction-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  background: var(--card-bg-hover);
}

/* ==========================================
   BOTÓN DE ME GUSTA - Estados
   ========================================== */

/* Estado por defecto: No logueado o sin like */
.like-btn {
  color: var(--text-secondary);
}

.like-btn.not-liked i,
.like-btn:not(.active):not(.liked) i {
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
}

.like-btn.not-liked i::before,
.like-btn:not(.active):not(.liked) i::before {
  content: '\f7a9'; /* fa-heart-crack - corazón roto */
  color: var(--text-tertiary);
}

/* Estado: Usuario dio like (activo y palpitando) */
.like-btn.active,
.like-btn.liked {
  background: rgba(220, 38, 38, 0.1);
  border-color: #dc2626;
  color: #dc2626;
}

.like-btn.active i,
.like-btn.liked i {
  color: #dc2626;
  animation: heartPulse 1.5s ease-in-out infinite;
}

.like-btn.active i::before,
.like-btn.liked i::before {
  content: '\f004'; /* fa-heart - corazón completo */
}

/* Animación de palpitación del corazón */
@keyframes heartPulse {
  0%, 100% {
    transform: scale(1);
  }
  10% {
    transform: scale(1.15);
  }
  20% {
    transform: scale(1);
  }
  30% {
    transform: scale(1.2);
  }
  40%, 100% {
    transform: scale(1);
  }
}

/* Hover en botón de like cuando NO está activo */
.like-btn:not(.active):not(.liked):hover {
  border-color: #fca5a5;
  color: #dc2626;
  background: rgba(220, 38, 38, 0.05);
}

.like-btn:not(.active):not(.liked):hover i::before {
  color: #dc2626;
}

/* ==========================================
   BOTÓN DE FAVORITO - Estados
   ========================================== */

/* Estado por defecto: No logueado o sin favorito */
.favorite-btn {
  color: var(--text-secondary);
}

.favorite-btn.not-favorited i,
.favorite-btn:not(.active):not(.favorited) i {
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
}

.favorite-btn.not-favorited i::before,
.favorite-btn:not(.active):not(.favorited) i::before {
  content: '\f5c0'; /* fa-star-half-stroke - estrella partida */
  color: var(--text-tertiary);
}

/* Estado: Usuario marcó como favorito (activo y palpitando) */
.favorite-btn.active,
.favorite-btn.favorited {
  background: rgba(212, 175, 55, 0.15);
  border-color: #d4af37;
  color: #d4af37;
}

.favorite-btn.active i,
.favorite-btn.favorited i {
  color: #d4af37;
  animation: starPulse 2s ease-in-out infinite;
}

.favorite-btn.active i::before,
.favorite-btn.favorited i::before {
  content: '\f005'; /* fa-star - estrella completa */
}

/* Animación de palpitación de la estrella */
@keyframes starPulse {
  0%, 100% {
    transform: scale(1) rotate(0deg);
  }
  25% {
    transform: scale(1.15) rotate(-5deg);
  }
  50% {
    transform: scale(1) rotate(0deg);
  }
  75% {
    transform: scale(1.15) rotate(5deg);
  }
}

/* Hover en botón de favorito cuando NO está activo */
.favorite-btn:not(.active):not(.favorited):hover {
  border-color: #fde047;
  color: #d4af37;
  background: rgba(212, 175, 55, 0.1);
}

.favorite-btn:not(.active):not(.favorited):hover i::before {
  color: #d4af37;
}

/* ==========================================
   BOTÓN DE COMPARTIR
   ========================================== */
.share-btn {
  color: var(--text-secondary);
}

.share-btn:hover {
  border-color: #60a5fa;
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.05);
}

.share-btn i {
  color: inherit;
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
  .modal-interactions {
    gap: 0.75rem;
  }
  
  .interaction-btn {
    padding: 0.875rem 0.75rem;
    font-size: 0.9rem;
  }
  
  .interaction-btn i {
    font-size: 1.25rem;
  }
  
  .interaction-btn span {
    display: none;
  }
  
  .like-btn #modalLikeCount {
    display: inline !important;
  }
}

/* ==========================================
   ACCESIBILIDAD
   ========================================== */
@media (prefers-reduced-motion: reduce) {
  .like-btn.active i,
  .like-btn.liked i,
  .favorite-btn.active i,
  .favorite-btn.favorited i {
    animation: none;
  }
  
  .interaction-btn {
    transition: none;
  }
}

/* Estado de carga */
.interaction-btn.loading {
  pointer-events: none;
  opacity: 0.6;
}

.interaction-btn.loading i {
  animation: spin 1s linear infinite;
}


  to {
    transform: rotate(360deg);
  }
}