/* ============================================
   UNIVERSAL LIVE ACTIVITY FEED
   ============================================ */

/* Floating Button */
.activity-feed-button {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 55px;
    height: 55px;
    background: linear-gradient(135deg, #FFD966, #FFB347);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    z-index: 999;
    border: 2px solid white;
}

.activity-feed-button:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
}

.activity-feed-button i {
    font-size: 1.8rem;
    color: #0B1120;
}

.activity-feed-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #EF4444;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 20px;
    min-width: 20px;
    text-align: center;
    animation: pulse-red 1.5s infinite;
}

@keyframes pulse-red {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
}

/* Modal Overlay */
.activity-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.activity-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Container */
.activity-modal {
    background: white;
    border-radius: 24px;
    width: 90%;
    max-width: 550px;
    height: 80vh;
    max-height: 600px;
    display: flex;
    flex-direction: column;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    overflow: hidden;
}

.activity-modal-overlay.active .activity-modal {
    transform: scale(1);
}

/* Modal Header */
.activity-modal-header {
    background: linear-gradient(135deg, #0B1120, #19233C);
    padding: 1.2rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.activity-modal-header h3 {
    color: white;
    font-size: 1.2rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.activity-modal-header h3 i {
    color: #FFD966;
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.live-badge {
    background: #10B981;
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-left: 0.5rem;
}

.live-badge i {
    font-size: 0.5rem;
    animation: blink 1s infinite;
}

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

.activity-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.3rem;
    border-radius: 50%;
    transition: 0.2s;
}

.activity-modal-close:hover {
    background: rgba(255,255,255,0.1);
}

/* Modal Body */
.activity-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: #F9FAFB;
}

.activity-modal-body::-webkit-scrollbar {
    width: 6px;
}

.activity-modal-body::-webkit-scrollbar-track {
    background: #E5E7EB;
    border-radius: 10px;
}

.activity-modal-body::-webkit-scrollbar-thumb {
    background: #FFD966;
    border-radius: 10px;
}

/* Activity Items */
.activity-feed-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    margin-bottom: 0.8rem;
    background: white;
    border-radius: 16px;
    transition: all 0.3s ease;
    animation: slideInLeft 0.3s ease;
    border-left: 3px solid transparent;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.activity-feed-item.new {
    animation: highlight 1s ease;
}

@keyframes highlight {
    0% { background: #FEF3C7; }
    100% { background: white; }
}

.activity-feed-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Activity Icon */
.activity-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-icon.blue { background: #DBEAFE; color: #1E40AF; }
.activity-icon.green { background: #D1FAE5; color: #065F46; }
.activity-icon.yellow { background: #FEF3C7; color: #B45309; }
.activity-icon.purple { background: #EDE9FE; color: #6D28D9; }
.activity-icon.red { background: #FEE2E2; color: #991B1B; }
.activity-icon.orange { background: #FFEDD5; color: #EA580C; }
.activity-icon.teal { background: #CCFBF1; color: #0F766E; }
.activity-icon.pink { background: #FCE7F3; color: #BE185D; }

.activity-icon i {
    font-size: 1.2rem;
}

/* Activity Content */
.activity-content {
    flex: 1;
}

.activity-title {
    font-weight: 700;
    color: #111827;
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
}

.activity-detail {
    font-size: 0.75rem;
    color: #6B7280;
    line-height: 1.4;
}

.activity-meta {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-top: 0.3rem;
}

.activity-time {
    font-size: 0.65rem;
    color: #9CA3AF;
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.activity-badge {
    font-size: 0.6rem;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-weight: 600;
}

.activity-badge.pending { background: #FEF3C7; color: #B45309; }
.activity-badge.approved { background: #D1FAE5; color: #065F46; }
.activity-badge.active { background: #DBEAFE; color: #1E40AF; }
.activity-badge.completed { background: #D1FAE5; color: #065F46; }
.activity-badge.new { background: #EFF6FF; color: #1E40AF; }

/* Empty State */
.activity-empty {
    text-align: center;
    padding: 3rem 2rem;
    color: #9CA3AF;
}

.activity-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.activity-empty p {
    font-size: 0.9rem;
}

/* Modal Footer */
.activity-modal-footer {
    padding: 1rem 1.5rem;
    background: white;
    border-top: 1px solid #E5E7EB;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.activity-count {
    font-size: 0.75rem;
    color: #6B7280;
}

.clear-activities-btn {
    background: #FEE2E2;
    border: none;
    padding: 0.4rem 1rem;
    border-radius: 40px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #991B1B;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.clear-activities-btn:hover {
    background: #FECACA;
    transform: scale(0.98);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .activity-feed-button {
        bottom: 15px;
        left: 15px;
        width: 45px;
        height: 45px;
    }
    
    .activity-feed-button i {
        font-size: 1.3rem;
    }
    
    .activity-modal {
        width: 95%;
        height: 85vh;
    }
    
    .activity-modal-header h3 {
        font-size: 1rem;
    }
    
    .activity-icon {
        width: 38px;
        height: 38px;
    }
    
    .activity-icon i {
        font-size: 1rem;
    }
    
    .activity-title {
        font-size: 0.85rem;
    }
    
    .activity-detail {
        font-size: 0.7rem;
    }
}