/* Online Presence Status Indicators */

/* Status dots */
.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
    position: relative;
    animation: pulse 2s infinite;
}

.status-dot.online {
    background-color: #28a745;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.2);
}

.status-dot.away {
    background-color: #ffc107;
    box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.2);
}

.status-dot.offline {
    background-color: #6c757d;
    box-shadow: 0 0 0 2px rgba(108, 117, 125, 0.2);
    animation: none;
}

/* Pulse animation for online status */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.4);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(40, 167, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
    }
}

/* Status circles (larger version) */
.status-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
    font-size: 12px;
    font-weight: bold;
    color: white;
}

.status-circle.online {
    background-color: #28a745;
}

.status-circle.away {
    background-color: #ffc107;
    color: #212529;
}

.status-circle.offline {
    background-color: #6c757d;
}

/* User list items with status */
.user-list-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.user-list-item:last-child {
    border-bottom: none;
}

.user-list-item .status-dot {
    flex-shrink: 0;
}

.user-list-item .user-info {
    flex-grow: 1;
    margin-left: 8px;
}

.user-list-item .user-name {
    font-weight: 500;
    color: #212529;
}

.user-list-item .user-status {
    font-size: 0.875em;
    color: #6c757d;
}

/* Profile presence card */
.presence-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid #e9ecef;
}

.presence-card .presence-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.presence-card .presence-header .status-circle {
    margin-right: 12px;
}

.presence-card .presence-header h4 {
    margin: 0;
    font-size: 1.1em;
    color: #212529;
}

.presence-card .presence-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.presence-card .stat-item {
    text-align: center;
    padding: 8px;
    background: white;
    border-radius: 6px;
}

.presence-card .stat-value {
    font-size: 1.2em;
    font-weight: bold;
    color: #212529;
}

.presence-card .stat-label {
    font-size: 0.8em;
    color: #6c757d;
    margin-top: 4px;
}

/* Search results status */
.search-result-item {
    position: relative;
}

.search-result-item .status-indicator {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
}

.search-result-item .status-dot {
    margin: 0;
}

/* Online filter buttons */
.online-filter {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.online-filter .filter-btn {
    padding: 6px 12px;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    background: white;
    color: #495057;
    font-size: 0.875em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.online-filter .filter-btn:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
}

.online-filter .filter-btn.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.online-filter .filter-btn.active.online {
    background: #28a745;
    border-color: #28a745;
}

.online-filter .filter-btn.active.away {
    background: #ffc107;
    color: #212529;
    border-color: #ffc107;
}

.online-filter .filter-btn.active.offline {
    background: #6c757d;
    border-color: #6c757d;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .presence-card .presence-stats {
        grid-template-columns: 1fr;
    }
    
    .online-filter {
        justify-content: center;
    }
    
    .search-result-item .status-indicator {
        top: 8px;
        right: 8px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .status-dot.online {
        background-color: #28a745;
        box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.3);
    }
    
    .status-dot.away {
        background-color: #ffc107;
        box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.3);
    }
    
    .status-dot.offline {
        background-color: #6c757d;
        box-shadow: 0 0 0 2px rgba(108, 117, 125, 0.3);
    }
    
    .presence-card {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .presence-card .presence-header h4 {
        color: #e2e8f0;
    }
    
    .presence-card .stat-item {
        background: #4a5568;
    }
    
    .presence-card .stat-value {
        color: #e2e8f0;
    }
    
    .presence-card .stat-label {
        color: #a0aec0;
    }
}
