/**
 * Live Activity Feed - FOMO Notifications
 * Displays real-time customer activities
 */

.live-activity-feed {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 9999;
    max-width: 380px;
    pointer-events: none;
}

.live-activity-item {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    pointer-events: all;
    animation: slideInRight 0.5s ease-out;
    transition: all 0.3s ease;
    border-left: 4px solid #D4AF37;
}

.live-activity-item:hover {
    transform: translateX(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.live-activity-item.exiting {
    animation: slideOutRight 0.5s ease-out forwards;
}

.live-activity-icon {
    font-size: 24px;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #F4E4BC 0%, #ffffff 100%);
    border-radius: 50%;
}

.live-activity-content {
    flex: 1;
    min-width: 0;
}

.live-activity-text {
    font-size: 14px;
    line-height: 1.4;
    color: #1a1a1a;
    margin-bottom: 6px;
    font-weight: 500;
}

.live-activity-text strong {
    color: #D4AF37;
    font-weight: 700;
}

.live-activity-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: #666;
}

.live-activity-location,
.live-activity-time {
    display: flex;
    align-items: center;
    gap: 4px;
}

.live-activity-location i,
.live-activity-time i {
    font-size: 10px;
    opacity: 0.7;
}

.live-activity-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.live-activity-close:hover {
    background: #f5f5f5;
    color: #333;
}

/* Live Viewers Count */
.live-viewers-count {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #1a1a1a;
    color: #ffffff;
    padding: 10px 18px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 9998;
    animation: pulse 2s infinite;
}

.live-viewers-dot {
    width: 8px;
    height: 8px;
    background: #00ff00;
    border-radius: 50%;
    animation: blink 1.5s infinite;
}

.live-viewers-count i {
    color: #D4AF37;
}

/* Animations */
@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .live-activity-feed {
        right: 10px;
        top: 80px;
        max-width: calc(100% - 20px);
    }
    
    .live-activity-item {
        padding: 12px;
        font-size: 13px;
    }
    
    .live-activity-icon {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }
    
    /* Position viewers count at top-right on mobile, not bottom */
    .live-viewers-count {
        bottom: auto;
        top: 70px;
        right: 10px;
        font-size: 11px;
        padding: 6px 12px;
        border-radius: 20px;
    }
}

@media (max-width: 480px) {
    .live-viewers-count {
        top: 65px;
        right: 8px;
        font-size: 10px;
        padding: 5px 10px;
    }
}

/* Activity Type Specific Colors */
.live-activity-item.purchase {
    border-left-color: #28a745;
}

.live-activity-item.view {
    border-left-color: #17a2b8;
}

.live-activity-item.cart_add {
    border-left-color: #ffc107;
}

.live-activity-item.wishlist_add {
    border-left-color: #e83e8c;
}

.live-activity-item.stock_alert {
    border-left-color: #dc3545;
    background: linear-gradient(135deg, #fff5f5 0%, #ffffff 100%);
}
