/* Solo2 Component: Tunnel Row (Premium Density) */

.tunnel-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    cursor: pointer;
    transition: background-color var(--transition-fast);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    position: relative;
    overflow: hidden;
    /* iOS/Safari touch improvements */
    -webkit-tap-highlight-color: rgba(99, 102, 241, 0.3);
    -webkit-touch-callout: none;
    user-select: none;
}

.tunnel-item:hover {
    background-color: rgba(99, 102, 241, 0.08);
}

.tunnel-item.selected {
    background-color: rgba(99, 102, 241, 0.15);
}

.tunnel-item.selected::before {
    content: '';
    position: absolute;
    left: 0;
    top: var(--space-sm);
    bottom: var(--space-sm);
    width: 4px;
    background-color: var(--color-primary);
    border-radius: 0 4px 4px 0;
}

/* Avatar con gradiente dinámico */
.tunnel-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, 
        hsl(var(--user-hue, 220), 60%, 45%), 
        hsl(calc(var(--user-hue, 220) + 30), 70%, 35%)
    );
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: white;
    flex-shrink: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    box-shadow: var(--shadow-sm);
}

/* Cuerpo de la fila */
.tunnel-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tunnel-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tunnel-last-msg {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Metadatos (derecha) */
.tunnel-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: var(--space-xs);
    flex-shrink: 0;
}

.tunnel-time {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    font-weight: 500;
}

.tunnel-indicators {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

/* Punto de conexión */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
}

.status-online { 
    background-color: var(--color-success); 
    box-shadow: 0 0 6px var(--color-success);
}

.status-offline {
    background-color: var(--color-text-muted);
    opacity: 0.5;
}

/* Badge de La Bóveda */
.vault-badge {
    font-size: 0.75rem;
    color: var(--color-amber);
    display: flex;
    align-items: center;
}

.vault-badge.hidden {
    display: none;
}
