/* Favorites Custom Styles */
/* Styles for favorite toggle buttons and icons */

/* Favorite icon button styles */
.add-to-favorites,
.favorite-toggle {
  position: relative;
  transition: all 0.3s ease;
  cursor: pointer;
}

/* Default state - not favorited */
.add-to-favorites .flaticon-like,
.favorite-toggle .flaticon-like {
  color: #6c757d;
  transition: all 0.3s ease;
}

/* Hover state */
.add-to-favorites:hover .flaticon-like,
.favorite-toggle:hover .flaticon-like {
  color: #dc3545;
  transform: scale(1.2);
}

/* Active/Favorited state */
.add-to-favorites.active .flaticon-like,
.favorite-toggle.active .flaticon-like {
  color: #dc3545 !important;
  font-weight: bold;
}

/* Pulse animation when adding to favorites */
@keyframes favoritePulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.3);
  }
  100% {
    transform: scale(1);
  }
}

.add-to-favorites.active .flaticon-like,
.favorite-toggle.active .flaticon-like {
  animation: favoritePulse 0.3s ease;
}

/* List meta2 icons alignment */
.list-meta2 .icons a {
  position: relative;
  z-index: 1;
}

/* Notification styles */
.favorite-notification {
  animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Property card favorite button in listing */
.listing-style1 .list-meta2 .icons a.add-to-favorites,
.listing-style1 .list-meta2 .icons a.favorite-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .favorite-notification {
    min-width: 200px;
    right: 10px !important;
    top: 60px !important;
  }
}

/* Filled heart icon for active favorites */
.add-to-favorites.active .flaticon-like::before,
.favorite-toggle.active .flaticon-like::before {
  content: "\f004";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
}

/* Loading state for favorite button */
.add-to-favorites.loading,
.favorite-toggle.loading {
  pointer-events: none;
  opacity: 0.6;
}

.add-to-favorites.loading .flaticon-like,
.favorite-toggle.loading .flaticon-like {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Favorites page - delete button styles */
.tag-del {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.tag-del:hover {
  background: #dc3545;
  color: white;
  transform: scale(1.1);
}

.tag-del .fas {
  font-size: 14px;
}

/* Empty state styling */
#emptyState {
  padding: 60px 20px;
}

#emptyState .flaticon-like {
  font-size: 80px;
  color: #dee2e6;
  margin-bottom: 20px;
  display: block;
}

/* Loading state styling */
#loadingState {
  padding: 60px 20px;
}

.spinner-border {
  width: 3rem;
  height: 3rem;
}

/* ========================================
   Favorites Page - Property Card Styles
   ======================================== */

/* Fix list-thumb image sizing for consistent card heights */
#favoritesContainer .listing-style1 .list-thumb {
  position: relative;
  overflow: hidden;
  height: 200px;
}

#favoritesContainer .listing-style1 .list-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Fix list-title overflow */
#favoritesContainer .listing-style1 .list-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 48px;
  line-height: 1.4;
}

#favoritesContainer .listing-style1 .list-title a {
  color: inherit;
  text-decoration: none;
}

/* Fix list-text location overflow */
#favoritesContainer .listing-style1 .list-text {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14px;
  color: #6c757d;
}

/* Responsive adjustments */
@media (max-width: 1199px) {
  #favoritesContainer .listing-style1 .list-thumb {
    height: 180px;
  }
}

@media (max-width: 767px) {
  #favoritesContainer .listing-style1 .list-thumb {
    height: 200px;
  }
}
