/* Online Status Styles - Modern Design */

/* Online counter in chat header */
.online-counter {
    font-size: 11px !important;
    color: white !important;
    margin-left: 8px !important;
    margin-right: auto !important;
    padding: 4px 10px !important;
    border-radius: 16px !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: 2px solid #667eea !important;
    white-space: nowrap !important;
    transition: all 0.3s ease !important;
    font-weight: 600 !important;
    backdrop-filter: blur(4px) !important;
    position: relative !important;
    overflow: hidden !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3) !important;
    display: inline-block !important;
}

.online-counter::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.online-counter:hover::before {
    left: 100%;
}

.online-counter.has-online {
    color: #10b981;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.1));
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.1);
}

.online-counter.no-online {
    color: #6b7280;
    background: rgba(107, 114, 128, 0.1);
    border-color: rgba(107, 114, 128, 0.2);
}

/* Online users list container */
.online-users-container {
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(5, 150, 105, 0.03));
    border-bottom: 1px solid rgba(16, 185, 129, 0.1);
    border-top: 1px solid rgba(16, 185, 129, 0.1);
    margin: 0;
    animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(8px);
}

.online-users-header {
    font-size: 12px;
    color: #10b981;
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.online-users-header::before {
    content: '🟢';
    font-size: 10px;
    animation: pulse-glow 2s ease-in-out infinite;
}

.online-users-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.online-user {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #10b981;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.1));
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 20px;
    padding: 4px 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    font-weight: 500;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(4px);
}

.online-user::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.2), transparent);
    transition: left 0.5s ease;
}

.online-user:hover::before {
    left: 100%;
}

.online-user:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(5, 150, 105, 0.15));
    border-color: rgba(16, 185, 129, 0.5);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.online-user:active {
    transform: translateY(0) scale(0.98);
}

.online-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: radial-gradient(circle, #10b981, #059669);
    animation: pulse-online 2s ease-in-out infinite;
    flex-shrink: 0;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

/* User status dots in chat messages */
.user-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-left: 6px;
    display: inline-block;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.user-status-dot.online {
    background: radial-gradient(circle, #10b981, #059669);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
    animation: pulse-online 2s ease-in-out infinite;
}

.user-status-dot.offline {
    background: #6b7280;
    opacity: 0.5;
}

/* Enhanced Animations */
@keyframes pulse-online {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1);
        box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
    }
    50% { 
        opacity: 0.7; 
        transform: scale(1.2);
        box-shadow: 0 0 12px rgba(16, 185, 129, 0.7);
    }
}

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

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-15px);
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        backdrop-filter: blur(8px);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .online-counter {
        font-size: 9px;
        padding: 1px 4px;
    }
    
    .online-users-container {
        padding: 6px 10px;
    }
    
    .online-user {
        font-size: 10px;
        padding: 1px 6px;
    }
}

/* Integration with existing chat styles */
.chat .column-header {
    flex-wrap: wrap;
    gap: 4px;
}

.chat-msg .chat-user {
    display: flex;
    align-items: center;
}

/* Tooltip styles for status dots */
.user-status-dot {
    position: relative;
}

.user-status-dot::after {
    content: attr(title);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 1000;
}

.user-status-dot:hover::after {
    opacity: 1;
}
