/* Simplified Favorites System Styles */

/* Image Card Title with Inline Heart */
.image-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 600;
}

.title-link {
    color: #333;
    text-decoration: none;
    flex: 1;
    margin-right: 0.5rem;
}

.title-link:hover {
    color: #007bff;
    text-decoration: underline;
}

/* Favorite Container */
.favorite-container {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* Inline Favorite Button */
.favorite-btn-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: transparent;
    border: 1px solid #e9ecef;
    border-radius: 16px;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    font-size: 0.75rem;
    font-weight: 500;
}

.favorite-btn-inline:hover {
    background: #f8f9fa;
    border-color: #ff6b6b;
    color: #ff6b6b;
    transform: scale(1.05);
}

.favorite-btn-inline:active {
    transform: scale(0.95);
}

.favorite-btn-inline:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Favorited State */
.favorite-btn-inline.favorited {
    background: #ff6b6b;
    border-color: #ff6b6b;
    color: white;
    box-shadow: 0 2px 4px rgba(255, 107, 107, 0.3);
}

.favorite-btn-inline.favorited:hover {
    background: #ff5252;
    border-color: #ff5252;
    transform: scale(1.05);
    color: white;
}

/* Login Required State */
.favorite-btn-inline.login-required {
    background: #f8f9fa;
    border-color: #dee2e6;
    color: #adb5bd;
}

.favorite-btn-inline.login-required:hover {
    background: #e9ecef;
    border-color: #007bff;
    color: #007bff;
}

/* Heart Icon Animation */
.heart-icon {
    transition: all 0.2s ease;
}

.favorite-btn-inline:hover .heart-icon {
    transform: scale(1.1);
}

.favorite-btn-inline.favorited .heart-icon {
    animation: heartBeat 0.6s ease;
}

@keyframes heartBeat {
    0% { transform: scale(1); }
    25% { transform: scale(1.2); }
    50% { transform: scale(1.1); }
    75% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

/* Image Metadata Styling */
.image-metadata {
    color: #6c757d;
    font-size: 0.875rem;
    margin: 0 0 0.75rem 0;
}

/* Notifications - ESSENTIAL for feedback */
.favorite-notification {
    position: fixed;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 1;
    transition: opacity 0.3s ease;
    pointer-events: none;
    max-width: 300px;
    z-index: 10000;
}

.favorite-notification.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.favorite-notification.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f1aeb5;
}

.favorite-notification.login-prompt {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10001;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.favorite-notification .login-link {
    color: #007bff;
    text-decoration: none;
    font-weight: 600;
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    background: rgba(0, 123, 255, 0.1);
    transition: background 0.2s ease;
}

.favorite-notification .login-link:hover {
    background: rgba(0, 123, 255, 0.2);
    text-decoration: none;
    color: #0056b3;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .favorite-btn-inline {
        width: 28px;
        height: 28px;
    }
    
    .heart-icon {
        width: 16px;
        height: 16px;
    }
    
    .image-title {
        font-size: 0.9rem;
    }
    
    .favorite-notification {
        left: 1rem !important;
        right: 1rem !important;
        width: auto !important;
        max-width: none;
        transform: none !important;
        top: 20px !important;
    }
    
    .favorite-notification.login-prompt {
        position: fixed;
        top: 50% !important;
        left: 1rem !important;
        right: 1rem !important;
        transform: translateY(-50%) !important;
        width: auto;
    }
}

/* Loading States */
.favorite-btn-inline.loading {
    position: relative;
}

.favorite-btn-inline.loading .heart-icon {
    opacity: 0;
}

.favorite-btn-inline.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 14px;
    margin: -7px 0 0 -7px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .favorite-btn-inline {
        border-width: 2px;
    }
    
    .favorite-btn-inline.favorited {
        background: #d63384;
        border-color: #d63384;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .favorite-btn-inline,
    .heart-icon,
    .favorite-notification {
        transition: none;
        animation: none;
    }
    
    .favorite-btn-inline:hover {
        transform: none;
    }
}

/* Print Styles */
@media print {
    .favorite-btn-inline,
    .favorite-notification {
        display: none;
    }
}


/* ========================================
   FAVORITES PAGE SPECIFIC STYLES
   Add these to your existing favorites.css
   ======================================== */

/* User Info Bar */
.user-info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.user-summary {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.user-greeting {
    font-weight: 600;
    color: #495057;
}

.user-tier {
    font-size: 0.9em;
    color: #6c757d;
    text-transform: capitalize;
}

.favorites-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Empty State Styling */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    margin: 40px 0;
}

.empty-state-content {
    max-width: 500px;
    margin: 0 auto;
}

.empty-state-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.empty-state h2 {
    color: #495057;
    margin-bottom: 15px;
}

.empty-state p {
    color: #6c757d;
    font-size: 1.1em;
    margin-bottom: 30px;
}

.empty-state-help {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: left;
}

.empty-state-help h3 {
    margin-top: 0;
    color: #495057;
}

.empty-state-help ol {
    margin: 15px 0;
    padding-left: 20px;
}

.empty-state-help li {
    margin-bottom: 8px;
    color: #6c757d;
}

.empty-state-actions {
    margin-top: 30px;
}

/* Favorites Summary */
.favorites-summary {
    margin-top: 40px;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 12px;
    text-align: center;
}

.summary-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 20px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.stat-number {
    font-size: 2em;
    font-weight: bold;
    color: #495057;
}

.stat-label {
    color: #6c757d;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Favorite Date Badges (for enhanced image cards) */
.image-card[data-favorited-date]::after {
    content: "Favorited: " attr(data-favorited-date);
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 2;
}

.image-card[data-favorited-date]:hover::after {
    opacity: 1;
}

/* Mobile Responsiveness for Favorites Page */
@media (max-width: 768px) {
    .user-info-bar {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .summary-stats {
        flex-direction: column;
        gap: 20px;
    }

    .empty-state {
        padding: 40px 15px;
    }
}

/* Sort Feedback Animation */
.sort-feedback {
    animation: slideInRight 0.3s ease;
}

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