/**
 * Status Control CSS
 * Styles for user status management UI
 */

.status-control {
    position: relative;
    display: inline-block;
    margin-left: 10px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #2a2a2a;
    border: 1px solid #404040;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.status-indicator:hover {
    background: #3a3a3a;
    border-color: #505050;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4CAF50;
    transition: all 0.2s ease;
}

.status-text {
    font-size: 14px;
    color: #ffffff;
    font-weight: 500;
}

.status-arrow {
    font-size: 10px;
    color: #888;
    transition: transform 0.2s ease;
}

.status-control:hover .status-arrow {
    transform: rotate(180deg);
}

.status-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: #2a2a2a;
    border: 1px solid #404040;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    min-width: 200px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.status-dropdown.show {
    opacity: 1;
    transform: translateY(0);
}

.status-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #404040;
}

.status-option:last-child {
    border-bottom: none;
    border-radius: 0 0 6px 6px;
}

.status-option:first-child {
    border-radius: 6px 6px 0 0;
}

.status-divider {
    height: 1px;
    background: #404040;
    margin: 4px 0;
}

.status-option:hover {
    background: #3a3a3a;
}

.status-option.active {
    background: #1a4a6a;
    color: #4CAF50;
}

.status-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.status-label {
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
    flex: 1;
}

.status-desc {
    font-size: 12px;
    color: #888;
    margin-left: auto;
}

/* Status-specific colors */
.status-option[data-status="online"]:hover {
    background: rgba(76, 175, 80, 0.1);
}

.status-option[data-status="away"]:hover {
    background: rgba(255, 152, 0, 0.1);
}

.status-option[data-status="offline"]:hover {
    background: rgba(244, 67, 54, 0.1);
}

.status-option[data-status="hidden"]:hover {
    background: rgba(158, 158, 158, 0.1);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .status-control {
        margin-left: 5px;
    }
    
    .status-indicator {
        padding: 6px 10px;
        gap: 6px;
    }
    
    .status-text {
        font-size: 12px;
    }
    
    .status-dropdown {
        min-width: 180px;
        right: -10px;
    }
    
    .status-option {
        padding: 10px 12px;
        gap: 10px;
    }
    
    .status-label {
        font-size: 13px;
    }
    
    .status-desc {
        font-size: 11px;
    }
}

/* Dark theme adjustments */
@media (prefers-color-scheme: dark) {
    .status-indicator {
        background: #1a1a1a;
        border-color: #333;
    }
    
    .status-indicator:hover {
        background: #2a2a2a;
        border-color: #444;
    }
    
    .status-dropdown {
        background: #1a1a1a;
        border-color: #333;
    }
    
    .status-option {
        border-color: #333;
    }
    
    .status-option:hover {
        background: #2a2a2a;
    }
    
    .status-option.active {
        background: #0d3a5a;
    }
}

/* Animation for status changes */
@keyframes statusChange {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.status-dot.status-changing {
    animation: statusChange 0.3s ease;
}

/* Loading state */
.status-control.loading .status-indicator {
    opacity: 0.6;
    cursor: not-allowed;
}

.status-control.loading .status-dot {
    animation: pulse 1s infinite;
}

/* Profile Status Dots - Avatar indicators */
.profile-avatar-wrapper {
    position: relative;
}

.profile-avatar-wrapper .status-dot {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--color-surface-1, #ffffff);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 10;
    transition: all 0.2s ease;
}

.profile-card-avatar {
    position: relative;
}

.profile-card-status-dot {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--color-surface-1, #ffffff);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    z-index: 10;
    transition: all 0.2s ease;
}

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