/**
 * Favorites System Styles
 * Styling for favorite buttons, modals, and notifications
 */

/* Favorite Button Container */
.favorite-button-container {
    position: absolute;
    right: 10px;
    bottom: 10px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    width: 36px;
    height: 36px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 3;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.favorite-button-container:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 1);
}

.favorite-button-container.processing {
    opacity: 0.6;
    cursor: wait;
}

/* Favorite Icon */
.favorite-icon {
    font-size: 18px;
    color: #333;
    transition: all 0.3s ease;
}

.favorite-button-container:hover .favorite-icon {
    color: #ff6b6b;
}

.favorite-button-container.active .favorite-icon {
    color: #ff6b6b;
    animation: heart-pulse 0.3s ease;
}

/* Heart pulse animation when favorited */
@keyframes heart-pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
    }
    100% {
        transform: scale(1);
    }
}

/* Processing state animation */
.favorite-button-container.processing .favorite-icon {
    animation: heart-beat 1s ease infinite;
}

@keyframes heart-beat {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Login Modal */
.favorites-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.favorites-modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    margin: 10% auto;
    padding: 0;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: modal-slide-in 0.3s ease;
}

@keyframes modal-slide-in {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.favorites-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #999;
    font-size: 28px;
    font-weight: 300;
    cursor: pointer;
    transition: color 0.2s ease;
    line-height: 1;
}

.favorites-modal-close:hover {
    color: #333;
}

.favorites-modal-body {
    padding: 40px 30px;
    text-align: center;
}

.favorites-modal-icon {
    font-size: 60px;
    color: #ff6b6b;
    margin-bottom: 20px;
    animation: heart-float 2s ease-in-out infinite;
}

@keyframes heart-float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.favorites-modal-body h3 {
    margin: 0 0 15px 0;
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.favorites-modal-body p {
    margin: 0 0 25px 0;
    font-size: 16px;
    color: #666;
    line-height: 1.5;
}

.favorites-modal-button {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(to right, #ff8c00, #ff6b6b);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.favorites-modal-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
    color: white;
}

/* Notification Toast */
.favorites-notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10001;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    max-width: 300px;
}

.favorites-notification.show {
    opacity: 1;
    transform: translateY(0);
}

.favorites-notification i {
    font-size: 20px;
}

.favorites-notification-success i {
    color: #4caf50;
}

.favorites-notification-error i {
    color: #f44336;
}

.favorites-notification span {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

/* Responsive Design */
@media (max-width: 576px) {
    .favorite-button-container {
        width: 32px;
        height: 32px;
        right: 8px;
        bottom: 8px;
    }
    
    .favorite-icon {
        font-size: 16px;
    }
    
    .favorites-modal-content {
        margin: 20% auto;
        width: 95%;
    }
    
    .favorites-modal-body {
        padding: 30px 20px;
    }
    
    .favorites-modal-icon {
        font-size: 50px;
    }
    
    .favorites-modal-body h3 {
        font-size: 20px;
    }
    
    .favorites-modal-body p {
        font-size: 14px;
    }
    
    .favorites-notification {
        bottom: 20px;
        right: 20px;
        left: 20px;
        max-width: none;
    }
}

/* Fallback for browsers without backdrop-filter */
@supports not ((backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px))) {
    .favorite-button-container {
        background: rgba(255, 255, 255, 0.98);
    }
}