/* Online Status Indicators */

.online-status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-left: 5px;
    font-size: 10px;
    line-height: 1;
    vertical-align: middle;
    position: relative;
}

.online-status-indicator.online {
    color: #10b981;
    animation: pulse-green 2s infinite;
}

.online-status-indicator.recently-online {
    color: #f59e0b;
    animation: pulse-yellow 2s infinite;
}

.online-status-indicator.offline {
    color: #6b7280;
}

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

@keyframes pulse-yellow {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Online status in user cards */
.user-card .online-status-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 12px;
    height: 12px;
    font-size: 12px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

/* Online status in profile headers */
.profile-header .online-status-indicator {
    margin-left: 10px;
    width: 10px;
    height: 10px;
    font-size: 12px;
}

/* Online status in member lists */
.member-list-item .online-status-indicator {
    margin-left: 8px;
    width: 8px;
    height: 8px;
    font-size: 10px;
}

/* Online count display */
.online-count {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    color: #6b7280;
}

.online-count .count {
    font-weight: 600;
    color: #10b981;
}

/* Last seen text */
.last-seen {
    font-size: 0.8rem;
    color: #9ca3af;
    font-style: italic;
}

.last-seen.online {
    color: #10b981;
    font-weight: 500;
}

.last-seen.recently-online {
    color: #f59e0b;
}

/* Online status badges */
.online-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.online-badge.online {
    background: #d1fae5;
    color: #065f46;
}

.online-badge.recently-online {
    background: #fef3c7;
    color: #92400e;
}

.online-badge.offline {
    background: #f3f4f6;
    color: #6b7280;
}

/* Online status in chat/messages */
.message-item .online-status-indicator {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    font-size: 10px;
    background: white;
    border-radius: 50%;
    border: 2px solid white;
}

/* Online status in sidebar */
.sidebar .online-status-indicator {
    margin-left: 6px;
    width: 8px;
    height: 8px;
    font-size: 10px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .online-status-indicator {
        width: 6px;
        height: 6px;
        font-size: 8px;
    }
    
    .user-card .online-status-indicator {
        width: 10px;
        height: 10px;
        font-size: 10px;
    }
    
    .online-badge {
        font-size: 0.7rem;
        padding: 1px 6px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .online-status-indicator.offline {
        color: #9ca3af;
    }
    
    .user-card .online-status-indicator {
        background: #1f2937;
    }
    
    .message-item .online-status-indicator {
        background: #1f2937;
        border-color: #1f2937;
    }
    
    .online-badge.online {
        background: #064e3b;
        color: #6ee7b7;
    }
    
    .online-badge.recently-online {
        background: #78350f;
        color: #fbbf24;
    }
    
    .online-badge.offline {
        background: #374151;
        color: #9ca3af;
    }
}
