```python
"""Melt a row of ice one simultaneous step at a time."""


def thaw_row(row: str, steps: int) -> str:
    """Simulate thawing ice cells in a row for a given number of steps.
    
    Args:
        row: A string of '#' (ice) and '.' (meltwater).
        steps: A non-negative integer indicating the number of steps to simulate.
        
    Returns:
        The row after the specified number of thaw steps.
        
    Raises:
        ValueError: If row is not a non-empty string, contains invalid characters,
                    or steps is not a non-negative integer.
    """
    if not isinstance(row, str):
        raise ValueError("row must be a string")
    if not row:
        raise ValueError("row must not be empty")
    if not all(c in '#.' for c in row):
        raise ValueError("row must contain only '#' and '.'")
    if not isinstance(steps, int) or isinstance(steps, bool):
        raise ValueError("steps must be a non-negative integer")
    if steps < 0:
        raise ValueError("steps must be a non-negative integer")
    
    if steps == 0:
        return row
    
    current_row = list(row)
    n = len(current_row)
    
    for _ in range(steps):
        # Determine which cells will melt in this step
        # An ice cell melts if:
        # 1. It is at the start (index 0)
        # 2. It is at the end (index n-1)
        # 3. It has meltwater directly beside it (left or right)
        
        to_melt = [False] * n
        
        for i in range(n):
            if current_row[i] == '#':
                # Check if at ends
                if i == 0 or i == n - 1:
                    to_melt[i] = True
                else:
                    # Check neighbors
                    if current_row[i - 1] == '.' or current_row[i + 1] == '.':
                        to_melt[i] = True
        
        # Apply changes simultaneously
        for i in range(n):
            if to_melt[i]:
                current_row[i] = '.'
    
    return "".join(current_row)
```